![]() |
VOOZH | about |
RuleRegistry Class
Namespace: Json.Logic
Inheritance: RuleRegistry 🡒 object
Catalogs all of the known rules.
Registers a new rule type.
1
public static void AddRule()
Rules must contain a parameterless constructor.
Decorate your rule type with one or more Json.Logic.OperatorAttributes to define its identifier.
Registering a rule with an identifier that already exists will overwrite the existing registration.
Registers a new rule type.
1
public static void AddRule(JsonSerializerContext typeContext)
Rules must contain a parameterless constructor.
Decorate your rule type with one or more Json.Logic.OperatorAttributes to define its identifier.
Registering a rule with an identifier that already exists will overwrite the existing registration.
Adds a custom Json.Logic.IRule implementation.
1
public static void AddRule(string op, IRule rule)
| Parameter | Type | Description |
|---|---|---|
| op | string | The operator that the rule handles. |
| rule | IRule | The rule implementation. |
Gets an Json.Logic.IRule handler for model-less rule evaluation.
1
public static IRule GetHandler(string op)
| Parameter | Type | Description |
|---|---|---|
| op | string | The operator that the rule handles. |
The handler implementation.
Gets a Json.Logic.Rule implementation for a given identifier string.
1
public static Type GetRule(string identifier)
| Parameter | Type | Description |
|---|---|---|
| identifier | string | The identifier. |
The System.Type of the rule.
A new version of content is available.