DefaultValue 类 (Microsoft.Office.Server.ApplicationRegistry.MetadataModel)
Represents a default value for a part of an input parameter of a back-end method.
命名空间: Microsoft.Office.Server.ApplicationRegistry.MetadataModel
程序集: Microsoft.SharePoint.Portal (在 microsoft.sharepoint.portal.dll 中)
语法
声明
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class DefaultValue
用法
Dim instance As DefaultValue
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)]
public class DefaultValue
备注
Some methods have complex signatures. For example, the Web service to get SAP customers could take six parameters, three of which could be structures with subparameters. To make it easier for users to call these methods, the Business Data Catalog allows you to specify default values for the parameters in the metadata. In this way, users can invoke predefined business logic without having to undertake parameter construction.
The user can override any input parameter for which you have defined a DefaultValue object. The user must specify any input parameter that has no DefaultValue object, if the parameter is not optional.
For each abstract primitive in a TypeDescriptor object, you can define multiple default values, each of which corresponds to a particular MethodInstance object. At run time, depending on which MethodInstance object the client executes, a parameter will be instantiated based on the corresponding default values.
If all parts of a parameter have default values, the Business Data Catalog can create an instance of the parameters for a method and execute it.
There is a different default value for each MethodInstance for a Method. Thus, executing different MethodInstances can result in completely different parameter instances being created by the Business Data Catalog.
The absence of a DefaultValue for a TypeDescriptor causes the value for that Type when instantiated to be considered as 'null'. Default Values should never be Nullable<> types. In most cases, they should be primitive types, from which the Business Data Catalog will construct complex instances.
继承层次结构
System.Object
Microsoft.Office.Server.ApplicationRegistry.MetadataModel.DefaultValue
线程安全性
此类型的任何公共静态(在 Visual Basic 中共享)成员是线程安全的。不保证任何实例成员都是线程安全的。
另请参阅
参考
DefaultValue 成员
Microsoft.Office.Server.ApplicationRegistry.MetadataModel 命名空间