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)); }
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)); }
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)); }
public static RuleTriggerDto Create(RuleTrigger properties) { return(properties.Accept(Instance)); }