Example #1
0
        public static Task <IEnumerable <ValidationError> > ValidateAsync(Guid appId, RuleTrigger action, IAppProvider appProvider)
        {
            Guard.NotNull(action);
            Guard.NotNull(appProvider);

            var visitor = new RuleTriggerValidator(x => appProvider.GetSchemaAsync(appId, x));

            return(action.Accept(visitor));
        }
Example #2
0
        public static Task <IEnumerable <ValidationError> > ValidateAsync(RuleTrigger action, ISchemaProvider schemas)
        {
            Guard.NotNull(action, nameof(action));
            Guard.NotNull(schemas, nameof(schemas));

            var visitor = new RuleTriggerValidator(schemas);

            return(action.Accept(visitor));
        }
Example #3
0
        public static Task <IEnumerable <ValidationError> > ValidateAsync(DomainId appId, RuleTrigger trigger, IAppProvider appProvider)
        {
            Guard.NotNull(trigger, nameof(trigger));
            Guard.NotNull(appProvider, nameof(appProvider));

            var visitor = new RuleTriggerValidator(x => appProvider.GetSchemaAsync(appId, x));

            return(trigger.Accept(visitor));
        }
Example #4
0
 public static RuleTriggerDto Create(RuleTrigger properties)
 {
     return(properties.Accept(Instance));
 }