Beispiel #1
0
        public Task <ITriggerBinding> TryCreateAsync(TriggerBindingProviderContext context)
        {
            ParameterInfo parameter = context.Parameter;

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

            if (triggerAttribute is null)
            {
                return(Task.FromResult <ITriggerBinding>(null));
            }
        }
        public Task <ITriggerBinding> TryCreateAsync(TriggerBindingProviderContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            ParameterInfo parameter = context.Parameter;

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

            if (triggerAttribute is null)
            {
                return(Task.FromResult <ITriggerBinding>(null));
            }
        }
Beispiel #3
0
 public NewEntityTriggerBinding(ParameterInfo parameter,
                                NewEntityTriggerAttribute triggerAttribute)
 {
     this.parameter        = parameter;
     this.triggerAttribute = triggerAttribute;
 }