DevForce Help Reference
EntityManager Constructor(EntityManager,Boolean,String,EntityServiceOption,String)


EntityManager to copy settings from
True if a connection to the EntityServer should be made.
The DataSourceKey extension to search for in IdeaBlade configuration file.
Determines whether to use local or distributed data sources.
Optional name of the CompositionContext to use for MEF composition.
Initialize a new instance of the EntityManager class using the credentials and settings from another EntityManager, but with the connection state, data source extension and options specified.
Syntax
'Declaration
 
Public Function New( _
   ByVal entityManager As EntityManager, _
   ByVal shouldConnect As Boolean, _
   Optional ByVal dataSourceExtension As String, _
   Optional ByVal entityServiceOption As EntityServiceOption, _
   Optional ByVal compositionContextName As String _
)
'Usage
 
Dim entityManager As EntityManager
Dim shouldConnect As Boolean
Dim dataSourceExtension As String
Dim entityServiceOption As EntityServiceOption
Dim compositionContextName As String
 
Dim instance As New EntityManager(entityManager, shouldConnect, dataSourceExtension, entityServiceOption, compositionContextName)

Parameters

entityManager
EntityManager to copy settings from
shouldConnect
True if a connection to the EntityServer should be made.
dataSourceExtension
The DataSourceKey extension to search for in IdeaBlade configuration file.
entityServiceOption
Determines whether to use local or distributed data sources.
compositionContextName
Optional name of the CompositionContext to use for MEF composition.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionentityManager is null
IdeaBlade.Core.IdeaBladeExceptionThrown for miscellaneous initialization failures
EntityServerExceptionThrown for connection failures
System.ArgumentExceptionThrown in a Silverlight application when BOS is not specified
Remarks
This copy constructor will create a new "empty" (no data) EntityManager with the same settings and defaults as the specified EntityManager. The connection state, data source extension, and option for distributed or local data sources specified here will override the values from the source EntityManager. The new EntityManager will be "logged in" to the EntityServer with the credentials already provided in the passed EntityManager.

An EntityManagerCreated event is fired upon creation.

Requirements

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

See Also

Reference

EntityManager Class
EntityManager Members
Overload List

Send Feedback