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