Derived Members

Meta Data Services Programming

Meta Data Services Programming

Derived Members

Derived members is a capability that can be used to delegate the implementation of members of one interface to members of another interface, where both interfaces are implemented by the same class.

Aliasing is a simplified form of member delegation, where a member of one interface is derived from a member of another without modifying its underlying semantics. Through aliasing, you can overlap functionality for multiple interfaces.

For example, when interfaces evolve, you can rename properties and methods, place them on different interfaces, and still maintain the naming scheme of the original interface. Similarly, aliasing provides a way to flatten multiple interfaces into a single interface that contains members from all of them. The advantage to flattening a set of interfaces is that it simplifies navigation. Also, aliasing simulates multiple inheritance.

Note  You can define aliases for type information elements other than members. For more information about type information aliasing, see Type Information Aliasing.

The following topics discuss how member derivation aliasing enables these scenarios.

Topic Description
Supporting Multiple Interfaces With Overlapping Functionality Describes how you can reuse interface definitions through derived members.
Flattening Interfaces Describes how you can combine interface members into one interface to simplify navigation.
Simulating Multiple Inheritance Explains how you can simulate multiple inheritance using derived members.

A semantically richer variant of derived members allows a collection on one interface to be derived from a collection on another interface while, at the same time, filtering out some of the base collection members.

The following topics discuss how member derivation enables these scenarios.

Topic Description
Specializing Relationship Collections Describes how you can create special-purpose collections that are based on a general-purpose collection.
Filtering Derived Collections Describes how you can apply filtering techniques to a derived collection.

See Also

Creating a Derived Member

Defining Inheritance

Derived Member Requirements