Runtime.Trigger Attribute
Gets the trigger type for the smart contract.
Namespace: Neo.SmartContract.Framework.Services
Assembly: Neo.SmartContract.Framework
Syntax#
public static extern TriggerType Trigger { get; }Attribute:TriggerType.
Example#
public static bool Main(){ if (Runtime.Trigger == TriggerType.Verification) { // do something; } else if (Runtime.Trigger == TriggerType.Application) { // do something; }}