Table of Contents

Class TypeCheckFunctionsExtensions

Namespace
Microsoft.Azure.Documents.SystemFunctions
Assembly
Microsoft.Azure.Documents.Client.dll

Provide methods for type checking. These methods are to be used in LINQ expressions only and will be evaluated on server. There's no implementation provided in the client library.

public static class TypeCheckFunctionsExtensions
Inheritance
TypeCheckFunctionsExtensions
Inherited Members

Methods

IsDefined(object)

Determines if a certain property is defined or not.

public static bool IsDefined(this object obj)

Parameters

obj object

Returns

bool

Returns true if this property is defined otherwise returns false.

Examples

var isDefinedQuery = documents.Where(document => document.Name.IsDefined());

IsNull(object)

Determines if a certain property is null or not.

public static bool IsNull(this object obj)

Parameters

obj object

Returns

bool

Returns true if this property is null otherwise returns false.

Examples

var isNullQuery = documents.Where(document => document.Name.IsNull());

IsPrimitive(object)

Determines if a certain property is of premitive JSON type.

public static bool IsPrimitive(this object obj)

Parameters

obj object

Returns

bool

Returns true if this property is null otherwise returns false.

Examples

var isPrimitiveQuery = documents.Where(document => document.Name.IsPrimitive());

Remarks

Premitive JSON types (Double, String, Boolean and Null)