protected override void modify(ElementRequest request) { var graph = request.Get <RemoteRuleGraph>(); var rules = graph.RulesFor(request.Accessor); var data = new RemoteValidationDef { rules = rules.Select(x => x.ToHash()).ToArray(), url = request.Get <IUrlRegistry>().RemoteRule() }; if (!data.rules.Any()) { return; } request.CurrentTag.Data("remote-rule", data); }
protected override void modify(ElementRequest request) { var graph = request.Get<RemoteRuleGraph>(); var rules = graph.RulesFor(request.Accessor); var data = new RemoteValidationDef { rules = rules.Select(x => x.ToHash()).ToArray(), url = request.Get<IUrlRegistry>().RemoteRule() }; if (!data.rules.Any()) { return; } request.CurrentTag.Data("remote-rule", data); }