Abstract
ICompositionContextResolver that automatically registers any statically defined
CompositionContexts found within the class.
Syntax
Example
C# | Copy Code |
---|
// Sample BaseCompositionContextResolver sub-type providing static fields defining CompositionContexts.
public class CompositionContextResolver : BaseCompositionContextResolver {
public static CompositionContext Mock = new CompositionContext("MyMock", true,
typeof(MockEntityServerSaveInterceptor), typeof(MockEntityServerQueryInterceptor));
}
// Sample class - note it is marked as not discoverable so that standard MEF
// composition will not find it.
[PartNotDiscoverable]
public class MockEntityServerQueryInterceptor : EntityServerQueryInterceptor {
protected override bool ExecuteQuery() {
throw new InvalidOperationException();
}
}
[PartNotDiscoverable]
public class MockEntityServerSaveInterceptor : EntityServerSaveInterceptor {
protected override bool ExecuteSave() {
throw new InvalidOperationException();
}
} |
Remarks
Inheritance Hierarchy
System.Object
IdeaBlade.Core.Composition.BaseCompositionContextResolver
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also