ODataValidationSettings Class
This class describes the validation settings for querying.
Namespace: System.Web.Http.OData.Query
Assembly: System.Web.Http.OData (in System.Web.Http.OData.dll)
Inheritance Hierarchy
System.Object
System.Web.Http.OData.Query.ODataValidationSettings
Syntax
public class ODataValidationSettings
public ref class ODataValidationSettings
type ODataValidationSettings = class end
Public Class ODataValidationSettings
Constructors
Name | Description | |
---|---|---|
ODataValidationSettings() |
Properties
Name | Description | |
---|---|---|
AllowedArithmeticOperators | Gets or sets a list of allowed arithmetic operators including 'add', 'sub', 'mul', 'div', 'mod'. |
|
AllowedFunctions | Gets or sets a list of allowed functions used in the $filter query. The allowed functions include the following: String related: substringof, endswith, startswith, length, indexof, substring, tolower, toupper, trim, concat e.g. ~/Customers?$filter=length(CompanyName) eq 19 DateTime related: year, years, month, months, day, days, hour, hours, minute, minutes, second, seconds e.g. ~/Employees?$filter=year(BirthDate) eq 1971 Math related: round, floor, ceiling Type related:isof, cast, Collection related: any, all |
|
AllowedLogicalOperators | Gets or sets a list of allowed logical operators such as 'eq', 'ne', 'gt', 'ge', 'lt', 'le', 'and', 'or', 'not'. |
|
AllowedOrderByProperties | Gets a list of properties one can orderby the result with. Note, by default this list is empty, it means it can be ordered by any property. For example, having an empty collection means client can order the queryable result by any properties. Adding "Name" to this list means that it only allows queryable result to be ordered by Name property. |
|
AllowedQueryOptions | Gets or sets the query parameters that are allowed inside query. The default is all query options, including $filter, $skip, $top, $orderby, $expand, $select, $inlineCount, $format and $skiptoken. |
|
MaxAnyAllExpressionDepth | Gets or sets the maximum depth of the Any or All elements nested inside the query. |
|
MaxExpansionDepth | Gets or sets the max expansion depth for the $expand query option. |
|
MaxNodeCount | Gets or sets the maximum number of the nodes inside the $filter syntax tree. |
|
MaxOrderByNodeCount | Gets or sets the maximum number of expressions that can be present in the $orderby. |
|
MaxSkip | Gets or sets the max value of $skip that a client can request. |
|
MaxTop | Gets or sets the max value of $top that a client can request. |
Methods
Name | Description | |
---|---|---|
Equals(Object) | (Inherited from Object.) |
|
Finalize() | (Inherited from Object.) |
|
GetHashCode() | (Inherited from Object.) |
|
GetType() | (Inherited from Object.) |
|
MemberwiseClone() | (Inherited from Object.) |
|
ToString() | (Inherited from Object.) |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
System.Web.Http.OData.Query Namespace
Return to top