Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Threading Namespace / Thread­Access­Exception Class

ThreadAccessException Class

Exception thrown when the calling thread does not have access to the object.
Inheritance Hierarchy
System.Object
  System.Exception
    PostSharp.Patterns.Threading.ThreadingException
      PostSharp.Patterns.Threading.ThreadAccessException

Namespace:  PostSharp.Patterns.Threading
Assembly:  PostSharp.Patterns.Threading (in PostSharp.Patterns.Threading.dll) Version: 6.0.24.0 (6.0.24.0)
Syntax
C#
[SerializableAttribute]
public class ThreadAccessException : ThreadingException
Constructors
  NameDescription
Public methodThreadAccessException()
Initializes a new instance of the ThreadAccessException class with the default error message.
Public methodThreadAccessException(String)
Initializes a new instance of the ThreadAccessException class with a given error message.
Protected methodThreadAccessException(SerializationInfo, StreamingContext)
Deserialization constructor.
Public methodThreadAccessException(String, Exception)
Initializes a new instance of the ThreadAccessException class with a given error message and inner exception.
Remarks

This exception is raised when the calling thread accesses the object without going through a public method.

For the ReaderWriterSynchronizedThreadingModel, the exception may mean that a public method was not annotated with an access custom attribute (ReaderAttribute, WriterAttribute and others).

See Also