コード例 #1
0
        public Task <ITriggerBinding> TryCreateAsync(TriggerBindingProviderContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            ParameterInfo parameter = context.Parameter;

            CommandStepTriggerAttribute triggerAttribute = parameter.GetCustomAttribute <CommandStepTriggerAttribute>(inherit: false);

            if (triggerAttribute is null)
            {
                return(Task.FromResult <ITriggerBinding>(null));
            }
        }
コード例 #2
0
 public CommandStepTriggerBinding(ParameterInfo parameter, CommandStepTriggerAttribute triggerAttribute)
 {
     this.parameter        = parameter;
     this.triggerAttribute = triggerAttribute;
 }