Čítať v angličtine Upraviť

Zdieľať cez


IExtensibleObject<T> Interface

Definition

Enable an object to participate in custom behavior, such as registering for events, or watching state transitions.

C#
public interface IExtensibleObject<T> where T : IExtensibleObject<T>

Type Parameters

T

The type of the extension class.

Derived

Remarks

Implement IExtensibleObject<T> to enable aggregation of extensions.

For example, if you are implementing a TreeNode class and want to allow external code to add annotations and methods to some instances of TreeNode, you can have TreeNode implement IExtensibleObject<TreeNode>. This enables code that uses TreeNode to add objects that implement IExtensibleObject<TreeNode> to the Extensions collection.

There are four extensible objects in Windows Communication Foundation (WCF):

For a discussion about how to create extension to work with these objects, see Extensible Objects.

Properties

Extensions

Gets a collection of extension objects for this extensible object.

Applies to

Produkt Verzie
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0