Partager via


DefaultValue, classe (Microsoft.Office.Server.ApplicationRegistry.MetadataModel)

Represents a default value for a part of an input parameter of a back-end method.

Espace de noms : Microsoft.Office.Server.ApplicationRegistry.MetadataModel
Assembly : Microsoft.SharePoint.Portal (dans microsoft.sharepoint.portal.dll)

Syntaxe

'Déclaration
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class DefaultValue
'Utilisation
Dim instance As DefaultValue
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class DefaultValue

Remarques

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.

Hiérarchie d'héritage

System.Object
  Microsoft.Office.Server.ApplicationRegistry.MetadataModel.DefaultValue

Sécurité des threads

Les membres statiques publics de ce type (Shared en Visual Basic) sont sécurisés au niveau des threads. Il n'est pas garanti que les membres d'instance soient sécurisés au niveau des threads.

Voir aussi

Référence

Membres DefaultValue
Microsoft.Office.Server.ApplicationRegistry.MetadataModel, espace de noms