: DefaultValue (Clase) (Microsoft.Office.Server.ApplicationRegistry.MetadataModel)

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

Espacio de nombres:
Ensamblado: Microsoft.SharePoint.Portal (in microsoft.sharepoint.portal.dll)

Sintaxis

'Declaración
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class DefaultValue
'Uso
Dim instance As DefaultValue
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class DefaultValue

Comentarios

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.

Jerarquía de herencia

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

Seguridad de subprocesos

Todos los miembros estáticos públicos (compartidos en Visual Basic) de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancia sean seguros para los subprocesos.

Vea también

Referencia

DefaultValue (Miembros)
Microsoft.Office.Server.ApplicationRegistry.MetadataModel (Espacio de nombres)