IdeaBlade.Core Assembly > IdeaBlade.Core.Composition Namespace : BaseCompositionContextResolver Class |
'Declaration
<PartNotDiscoverableAttribute()> Public MustInherit Class BaseCompositionContextResolver Implements ICompositionContextResolver
'Usage
Dim instance As BaseCompositionContextResolver
[PartNotDiscoverable()] public abstract class BaseCompositionContextResolver : ICompositionContextResolver
// 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(); } }
System.Object
IdeaBlade.Core.Composition.BaseCompositionContextResolver
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2