AppSearchSchema.StringPropertyConfig.Builder.SetCardinality(Int32) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置属性的基数(无论是可选、必需还是重复)。
[Android.Runtime.Register("setCardinality", "(I)Landroid/app/appsearch/AppSearchSchema$StringPropertyConfig$Builder;", "", ApiSince=31)]
public Android.App.AppSearch.AppSearchSchema.StringPropertyConfig.Builder SetCardinality(int cardinality);
[<Android.Runtime.Register("setCardinality", "(I)Landroid/app/appsearch/AppSearchSchema$StringPropertyConfig$Builder;", "", ApiSince=31)>]
member this.SetCardinality : int -> Android.App.AppSearch.AppSearchSchema.StringPropertyConfig.Builder
参数
- cardinality
- Int32
值为下列值之一:AppSearchSchema.PropertyConfig.CARDINALITY_REPEATED AppSearchSchema.PropertyConfig.CARDINALITY_OPTIONAL AppSearchSchema.PropertyConfig.CARDINALITY_REQUIRED
返回
- 特性
注解
设置属性的基数(无论是可选、必需还是重复)。 如果未调用此方法,则默认基数PropertyConfig.CARDINALITY_OPTIONAL。
Android 参考。android.app.appsearch.AppSearchSchema.StringPropertyConfig.Builder.setCardinality
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。