ServiceDescription::GetService Method (Object^)
.NET Framework (current version)
Returns a service description initialized with a specified service object.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Parameters
- serviceImplementation
-
Type:
System::Object^
The Object that implements the service.
Return Value
Type: System.ServiceModel.Description::ServiceDescription^The ServiceDescription for the service object provided.
| Exception | Condition |
|---|---|
| ArgumentNullException | serviceImplementation is null. |
Use this method to reflect on behaviors using the Windows Communication Foundation (WCF) programming model when replacing ServiceHostBase with you own hosting mechanism.
GetService(Object^) initializes the Name, Namespace, and ConfigurationName properties, and ensures that the ServiceBehaviorAttribute is attached to the service and adds any relevant service behaviors to Behaviors.
.NET Framework
Available since 3.0
Available since 3.0
Show: