InstanceContext.Extensions Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the extension collection, if any, associated with the service instance.
public:
property System::ServiceModel::IExtensionCollection<System::ServiceModel::InstanceContext ^> ^ Extensions { System::ServiceModel::IExtensionCollection<System::ServiceModel::InstanceContext ^> ^ get(); };
public System.ServiceModel.IExtensionCollection<System.ServiceModel.InstanceContext> Extensions { get; }
member this.Extensions : System.ServiceModel.IExtensionCollection<System.ServiceModel.InstanceContext>
Public ReadOnly Property Extensions As IExtensionCollection(Of InstanceContext)
Property Value
The IExtensionCollection<T> of type InstanceContext that contains the instance contexts for the extensions of the service instance.
Implements
Exceptions
The service instance associated with this context is closed, but was not aborted.
The service instance associated with this context is in a faulted state.
Examples
The following code shows how to access the Extensions property:
Uri baseAddress = new Uri("http://localhost:8000/ServiceModelSamples/service");
CalculatorService service = new CalculatorService();
ServiceHost serviceHost = new ServiceHost(service, baseAddress);
InstanceContext instanceContext = new InstanceContext(serviceHost, service);
IExtensionCollection<InstanceContext> extensions = instanceContext.Extensions;
Applies to
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET