IdeaBlade DevForce 2010 Help Reference
AuthorizedThreadId Property
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManager Class : AuthorizedThreadId Property



The thread id that this EntityManager is authorized to execute on. An EntityManager can only execute on a single thread at one time.

Syntax

Visual Basic (Declaration) 
Public Property AuthorizedThreadId As Nullable(Of Integer)
Visual Basic (Usage)Copy Code
Dim instance As EntityManager
Dim value As Nullable(Of Integer)
 
instance.AuthorizedThreadId = value
 
value = instance.AuthorizedThreadId
C# 
public Nullable<int> AuthorizedThreadId {get; set;}
C++/CLI 
public:
property Nullable<int> AuthorizedThreadId {
   Nullable<int> get();
   void set (    Nullable<int> value);
}

Remarks

This property can be set to another thread id to allow that thread to take over use of the EntityManager. This is an advanced technique and should only be used if you have extensive familiarity with threading.

This property can also be set to null to remove all cross threading checks from the EntityManager. There are a few common cases where this is useful. 1) when executing async tests from within the Visual Studio Test environment (because VS does not use a synchronization context that guarantees that asynchronous calls will be returned to the same thread that created them) or 2) when executing an asynchronous operation from within one of the server side interception methods provided by the EntityServer, or 3) when executing an asynchronous operation from within an ASP.NET worker process.

Unless your case is one of these three or you are very familiar with threading models, we strongly suggest that you do not set this property to null.

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.