complete interface

Taken from the source code documentation.

This class attribute indicates that an interface acts as a complete interface for a class instantiated via ObjectFactory.

A complete interface combines the API of a target type with that of its mixins. For example, if a target class provides the methods A and B and a mixin adds the methods C and D, users of the class could normally only use either A and B or C and D at the same time (without casting). By implementing a complete interface that provides methods A, B, C, and D, users of the class can employ the full API in a simple way.

All methods specified by a complete interface must either be implemented on the target type or introduced via a mixin.

This interface can be applied multiple times if an interface is to be a complete interface for multiple target types. The attribute is not inherited, i.e. an interface inheriting from a complete interface does not automatically constitute a complete interface as well.

When the default mixin configuration is built via analysis of the declarative attributes, all complete interfaces are automatically registered with the active mixin configuration. This means that in the default mixin configuration, ObjectFactory.Create<T>(ParamList,object[])" will be able to create instances from these interfaces.


   public class MyMixinTarget
     public void A() { Console.WriteLine ("A"); }
     public void B() { Console.WriteLine ("B"); }
   [Extends (typeof (MyMixinTarget))]
   public class MyMixin : Mixin&lt;MyMixinTarget&gt;
     public void C() { Console.WriteLine ("D"); }
     public void D() { Console.WriteLine ("D"); }
   [CompleteInterface (typeof (MyMixinTarget))]
   public interface ICMyMixinTargetMyMixin
     void A();
     void B();
     void C();
     void D();

Complete interfaces can also be defined by inheriting from existing interfaces rather than spelling all the methods out explicitly.