Visual Basic (Declaration) | |
---|---|
Public Class CompositionContext |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As CompositionContext |
C# | |
---|---|
public class CompositionContext |
C++/CLI | |
---|---|
public ref class CompositionContext |
By default the Default context is used, which means that no special type or metadata filtering is performed. DevForce also provides a Fake context which is useful during testing to provide standardized fake implementations for 1) Id generation with the FakeIdGenerator; 2) an in-memory database with the EntityServerFakeBackingStore; 3) query functionality with the EdmQueryExecutorFake; and 4) save functionality with the EdmSaveExecutorFake.
You determine the composition context in use when you construct an EntityManager by optionally passing the name of the context wanted. When using any context other than the Default and Fake contexts provided, you can implement a custom ICompositionContextResolver to register and return the CompositionContext instance wanted. If you do not implement a custom resolver your custom contexts can also be registered automatically by the IdeaBlade.Core.Composition.BaseCompositionContextResolver. When using a custom context you can determine the types to be exported for MEF composition, and include custom metadata filtering.
System.Object
IdeaBlade.Core.Composition.CompositionContext
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