你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
FieldBuilder.BuildForType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
BuildForType(Type) |
创建对应于所提供的类型的属性的 对象的集合 Field 。 |
BuildForType(Type, IContractResolver) |
创建对应于所提供的类型的属性的 对象的集合 Field 。 |
BuildForType<T>() |
创建对应于所提供的类型的属性的 对象的集合 Field 。 |
BuildForType<T>(IContractResolver) |
创建对应于所提供的类型的属性的 对象的集合 Field 。 |
BuildForType(Type)
- Source:
- FieldBuilder.cs
创建对应于所提供的类型的属性的 对象的集合 Field 。
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)
参数
- modelType
- Type
将基于字段的属性为其创建字段的类型。
返回
字段的集合。
适用于
BuildForType(Type, IContractResolver)
- Source:
- FieldBuilder.cs
创建对应于所提供的类型的属性的 对象的集合 Field 。
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)
参数
- modelType
- Type
将基于字段的属性为其创建字段的类型。
- contractResolver
- Newtonsoft.Json.Serialization.IContractResolver
SearchIndexClient 将使用的协定解析程序。 这可确保以与序列化模型的方式一致的方式生成字段名称。
返回
字段的集合。
适用于
BuildForType<T>()
- Source:
- FieldBuilder.cs
创建对应于所提供的类型的属性的 对象的集合 Field 。
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)
类型参数
- T
将基于字段的属性为其创建字段的类型。
返回
字段的集合。
适用于
BuildForType<T>(IContractResolver)
- Source:
- FieldBuilder.cs
创建对应于所提供的类型的属性的 对象的集合 Field 。
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)
类型参数
- T
将基于字段的属性为其创建字段的类型。
参数
- contractResolver
- Newtonsoft.Json.Serialization.IContractResolver
SearchIndexClient 将使用的协定解析程序。 这可确保以与序列化模型的方式一致的方式生成字段名称。
返回
字段的集合。
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈