IExtension<T>::Attach Method (T)
.NET Framework (current version)
Enables an extension object to find out when it has been aggregated. Called when the extension is added to the IExtensibleObject<T>::Extensions property.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Use this method to keep track of the IExtensibleObject<T> object to which the current instance of the extension belongs. This call gives extensions a chance to handle events or inspect properties of their owner.
The following example code shows how this method can be used to keep track of the IExtensibleObject<T> object to which the current instance of the extension belongs.
[C#]
InstanceContext owner;
public void Attach(InstanceContext owner)
{
this.owner = owner;
}
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: