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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應