ThreadSafetyComment Class

Namespace
Kampute.DocToolkit.XmlDoc.Comments
Assembly
  • Kampute.DocToolkit.dll

Definition

Represents the documentation content describing the thread safety of a class or struct.
public class ThreadSafetyComment : Comment
Inheritance

Remarks

The ThreadSafetyComment class represents the <threadSafety> XML documentation tag, which is used to provide information about the thread safety of a class or struct.

Thread safety information is separated into two distinct categories: static member thread safety and instance member thread safety. This distinction is important because a type might have thread-safe static members but non-thread-safe instance members, or vice versa.

Thread Safety

All public members of the type are guaranteed to be thread-safe.

Constructors

ThreadSafetyComment(XElement)Initializes a new instance of the ThreadSafetyComment struct.

Fields

EmptyRepresents an empty thread safety comment.

Properties

IsEmptyGets a value indicating whether the comment is without thread-safety information.
IsInstanceSafeGets a value indicating whether the instance members of the class/struct are thread-safe.
IsSafeGets a value indicating whether both static and instance members of the class/struct are thread-safe.
IsStaticSafeGets a value indicating whether the static members of the class/struct are thread-safe.

Methods

Create(XElement)Creates a thread safety comment from the specified XML element.