IdeaBlade DevForce 2010 Help Reference
EntityManager Constructor(EntityManager,Boolean,String,EntityServiceOption,String)
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManager Class > EntityManager Constructor : EntityManager Constructor(EntityManager,Boolean,String,EntityServiceOption,String)



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.
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

Visual Basic (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 _
)
Visual Basic (Usage)Copy Code
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.ArgumentNullException is null
IdeaBlade.Core.IdeaBladeExceptionThrown for miscellaneous initialization failures
IdeaBlade.EntityModel.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 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

© 2013 All Rights Reserved.