Class OperatorFactory
Provides factory methods for creating Operator values from string representations.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.TemplateQuery
Assembly: Umbraco.Core.dll
Syntax
public static class OperatorFactory
Methods
View SourceFromString(string)
Converts a string representation of an operator to its Operator enumeration value.
Declaration
public static Operator FromString(string stringOperator)
Parameters
| Type | Name | Description |
|---|---|---|
| string | stringOperator | The string representation of the operator (e.g., "=", "!=", "<", ">"). |
Returns
| Type | Description |
|---|---|
| Operator | The corresponding Operator enumeration value. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when the string operator is null. |
| ArgumentException | Thrown when the string operator is not recognized. |