Facet.AsRangeFacet Method

Attempts to convert the facet to a range facet of the given type.

Namespace: Microsoft.Azure.Search.Models
Assembly: Microsoft.Azure.Search (in Microsoft.Azure.Search.dll)

Usage

'Usage
Dim instance As Facet
Dim returnValue As RangeFacet(Of T)

returnValue = instance.AsRangeFacet

Syntax

'Declaration
Public Function AsRangeFacet(Of T As Structure) As RangeFacet(Of T)
public RangeFacet<T> AsRangeFacet<T> () where T : struct
public:
generic<typename T> where T : ValueType
RangeFacet<T>^ AsRangeFacet ()

GenericParameters

  • T
    A type that matches the type of the field to which the facet was applied. Valid types include DateTimeOffset, Double, and Int64 (long in C#).

Return Value

A new strongly-typed range facet instance.

Exceptions

Exception type Condition
InvalidCastException

This instance is not a range facet of the given type.

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.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also

Reference

Facet Class
Facet Members
Microsoft.Azure.Search.Models Namespace