Unosquare
    Show / Hide Table of Contents

    Class LockTokenSource

    Signals to associated instances of LockToken that some data is locked.

    Inheritance
    Object
    LockTokenSource
    ConfigurationLockSource
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO.Utilities
    Syntax
    public class LockTokenSource
    Remarks

    LockTokenSource is used to instantiate a LockToken (via the source's Token property) that can be handed to owned objects that wish to be notified of data locking.

    All members of this class are thread-safe and may be used concurrently from multiple threads.

    Constructors

    LockTokenSource(String)

    Initializes a new instance of the LockTokenSource class.

    The Message property of exceptions thrown will include the specified description, in the following fashion: "The configuration of {ownerDescription} is locked and cannot be further changed.".

    Declaration
    public LockTokenSource(string exceptionMessage)
    Parameters
    Type Name Description
    String exceptionMessage

    The message to set on instances of LockedException thrown by the ThrowIfLocked() method of tokens associated with this instance.

    Properties

    IsLocked

    Gets whether this LockTokenSource has been locked.

    Declaration
    public bool IsLocked { get; }
    Property Value
    Type Description
    Boolean

    Token

    Gets a LockToken associated with this LockTokenSource.

    Declaration
    public LockToken Token { get; }
    Property Value
    Type Description
    LockToken

    Methods

    Lock()

    Communicates that data is locked.

    Declaration
    public void Lock()

    See Also

    LockToken

    Comments

    Back to top Copyright © 2017-2019 Unosquare