ValidationRuleSet.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| Add(Type, ValidationRule) |
Add a new rule into the rule set. |
| Add(Type, List<ValidationRule>) |
Add the new rule into the rule set. |
Add(Type, ValidationRule)
- Source:
- ValidationRuleSet.cs
Add a new rule into the rule set.
public void Add(Type key, Microsoft.OpenApi.ValidationRule rule);
member this.Add : Type * Microsoft.OpenApi.ValidationRule -> unit
Public Sub Add (key As Type, rule As ValidationRule)
Parameters
- key
- Type
The key for the rule.
- rule
- ValidationRule
The rule.
Exceptions
Exception thrown when rule already exists.
Applies to
Add(Type, List<ValidationRule>)
- Source:
- ValidationRuleSet.cs
Add the new rule into the rule set.
public void Add(Type key, System.Collections.Generic.List<Microsoft.OpenApi.ValidationRule> rules);
member this.Add : Type * System.Collections.Generic.List<Microsoft.OpenApi.ValidationRule> -> unit
Public Sub Add (key As Type, rules As List(Of ValidationRule))
Parameters
- key
- Type
The key for the rule.
- rules
- List<ValidationRule>
The list of rules.