Class SyncRoot
Use instances of this class to provide classes that must be made thread-safe with locks over which the class has complete control.
Inheritance
Namespace: WizardWrx
Assembly: WizardWrx.Core.dll
Syntax
public sealed class SyncRoot : object
Remarks
Use labeled instances when you expect to have multiple locks active, especially during the lifetime of a single method, or across calls to two or more related methods.
This class cannot be inherited.
Constructors
| Improve this Doc View SourceSyncRoot()
Create an unlabeled instance.
Declaration
public SyncRoot()
SyncRoot(String)
Create a labeled lockable object.
Declaration
public SyncRoot(string pstrLabel)
Parameters
Type | Name | Description |
---|---|---|
System.String | pstrLabel | Label to assign to the instance. |
Properties
| Improve this Doc View SourceLabel
Return the label assigned to this instance. Labels are read only. You must use the overloaded constructor to create a labeled instance.
Declaration
public string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceToString()
Display the label inside French braces, followed by the fully qualified class name, similar to the way many BCL classes render in debugger watch windows.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The returned string is the label, followed by the fully qualified class name. |