ValidationRuleSet.Remove 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 |
|---|---|
| Remove(ValidationRule) |
Removes the first rule that matches the provided rule from the list of rules. |
| Remove(String) |
Remove a rule by its name from all types it is used by. |
| Remove(Type) |
Removes a collection of rules. |
| Remove(Type, ValidationRule) |
Removes a rule by key. |
Remove(ValidationRule)
- Source:
- ValidationRuleSet.cs
Removes the first rule that matches the provided rule from the list of rules.
public bool Remove(Microsoft.OpenApi.ValidationRule rule);
member this.Remove : Microsoft.OpenApi.ValidationRule -> bool
Public Function Remove (rule As ValidationRule) As Boolean
Parameters
- rule
- ValidationRule
The rule to be removed.
Returns
true if the rule is successfully removed; otherwise, false.
Applies to
Remove(String)
- Source:
- ValidationRuleSet.cs
Remove a rule by its name from all types it is used by.
public void Remove(string ruleName);
member this.Remove : string -> unit
Public Sub Remove (ruleName As String)
Parameters
- ruleName
- String
Name of the rule.
Applies to
Remove(Type)
- Source:
- ValidationRuleSet.cs
Removes a collection of rules.
public bool Remove(Type key);
member this.Remove : Type -> bool
Public Function Remove (key As Type) As Boolean
Parameters
- key
- Type
The key of the collection of rules to be removed.
Returns
true if the collection of rules with the provided key is removed; otherwise, false.
Applies to
Remove(Type, ValidationRule)
- Source:
- ValidationRuleSet.cs
Removes a rule by key.
public bool Remove(Type key, Microsoft.OpenApi.ValidationRule rule);
member this.Remove : Type * Microsoft.OpenApi.ValidationRule -> bool
Public Function Remove (key As Type, rule As ValidationRule) As Boolean
Parameters
- key
- Type
The key of the rule to be removed.
- rule
- ValidationRule
The rule to be removed.
Returns
true if the rule is successfully removed; otherwise, false.