Visual Basic (Declaration) | |
---|---|
Public Property AuthorizedThreadId As Nullable(Of Integer) |
Visual Basic (Usage) | ![]() |
---|---|
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); } |
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.
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