ServiceDescription Class
TOC
Collapse the table of content
Expand the table of content

ServiceDescription Class

 

Represents a complete, in-memory description of the service, including all the endpoints for the service and specifications for their respective addresses, bindings, contracts and behaviors.

Namespace:   System.ServiceModel.Description
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

System.Object
  System.ServiceModel.Description.ServiceDescription

type ServiceDescription = class end

NameDescription
System_CAPS_pubmethodServiceDescription()

Initializes a new instance of the ServiceDescription class.

System_CAPS_pubmethodServiceDescription(IEnumerable<ServiceEndpoint>)

Initializes a new instance of the ServiceDescription class from a specified enumeration of service endpoints.

NameDescription
System_CAPS_pubpropertyBehaviors

Gets the behaviors associated with the service.

System_CAPS_pubpropertyConfigurationName

Gets or sets the name of the <service> configuration element.

System_CAPS_pubpropertyEndpoints

Gets the collection of endpoints from the service description.

System_CAPS_pubpropertyName

Gets or sets the name of the service.

System_CAPS_pubpropertyNamespace

Gets or sets the namespace for the service.

System_CAPS_pubpropertyServiceType

Gets the type of the service.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetService(Object)

Returns a service description initialized with a specified service object.

System_CAPS_pubmethodSystem_CAPS_staticGetService(Type)

Returns a service description initialized with a specified service type.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The information contained in the ServiceDescription is used by the Windows Communication Foundation (WCF) system to building the run-time components for the service.

Use this method when adding custom behaviors to extend ServiceHost. Programmatically, you must Add('T) the custom service behavior to the Behaviors prior to when you call the Open method on the ServiceHost object.

The GetService(Object) and GetService(Type) methods are available to reflect on behaviors using the Windows Communication Foundation (WCF) programming model when replacing ServiceHostBase with you own hosting mechanism.

Export metadata about a service endpoint by passing ServiceEndpoint as a parameter to ExportEndpoint(ServiceEndpoint). After calling this method, or one of the other export methods provided by WsdlExporter, use the GeneratedWsdlDocuments property to return the collection of ServiceDescription objects.

The following example illustrates various ways to instantiate a ServiceDescription object.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft