FieldBuilder.BuildForType 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
BuildForType(Type) |
Creates a collection of Field objects corresponding to the properties of the type supplied. |
BuildForType(Type, IContractResolver) |
Creates a collection of Field objects corresponding to the properties of the type supplied. |
BuildForType<T>() |
Creates a collection of Field objects corresponding to the properties of the type supplied. |
BuildForType<T>(IContractResolver) |
Creates a collection of Field objects corresponding to the properties of the type supplied. |
BuildForType(Type)
- Source:
- FieldBuilder.cs
Creates a collection of Field objects corresponding to the properties of the type supplied.
public static System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field> BuildForType (Type modelType);
static member BuildForType : Type -> System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field>
Public Shared Function BuildForType (modelType As Type) As IList(Of Field)
Parameters
- modelType
- Type
The type for which fields will be created, based on its properties.
Returns
A collection of fields.
Applies to
BuildForType(Type, IContractResolver)
- Source:
- FieldBuilder.cs
Creates a collection of Field objects corresponding to the properties of the type supplied.
public static System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field> BuildForType (Type modelType, Newtonsoft.Json.Serialization.IContractResolver contractResolver);
static member BuildForType : Type * Newtonsoft.Json.Serialization.IContractResolver -> System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field>
Public Shared Function BuildForType (modelType As Type, contractResolver As IContractResolver) As IList(Of Field)
Parameters
- modelType
- Type
The type for which fields will be created, based on its properties.
- contractResolver
- Newtonsoft.Json.Serialization.IContractResolver
Contract resolver that the SearchIndexClient will use. This ensures that the field names are generated in a way that is consistent with the way the model will be serialized.
Returns
A collection of fields.
Applies to
BuildForType<T>()
- Source:
- FieldBuilder.cs
Creates a collection of Field objects corresponding to the properties of the type supplied.
public static System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field> BuildForType<T> ();
static member BuildForType : unit -> System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field>
Public Shared Function BuildForType(Of T) () As IList(Of Field)
Type Parameters
- T
The type for which fields will be created, based on its properties.
Returns
A collection of fields.
Applies to
BuildForType<T>(IContractResolver)
- Source:
- FieldBuilder.cs
Creates a collection of Field objects corresponding to the properties of the type supplied.
public static System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field> BuildForType<T> (Newtonsoft.Json.Serialization.IContractResolver contractResolver);
static member BuildForType : Newtonsoft.Json.Serialization.IContractResolver -> System.Collections.Generic.IList<Microsoft.Azure.Search.Models.Field>
Public Shared Function BuildForType(Of T) (contractResolver As IContractResolver) As IList(Of Field)
Type Parameters
- T
The type for which fields will be created, based on its properties.
Parameters
- contractResolver
- Newtonsoft.Json.Serialization.IContractResolver
Contract resolver that the SearchIndexClient will use. This ensures that the field names are generated in a way that is consistent with the way the model will be serialized.
Returns
A collection of fields.
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for