Search Results for

    Show / Hide Table of Contents
    View Source

    Class MonitorLock

    Provides an equivalent to the c# lock statement, to be used in a using block.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Core.dll
    Syntax
    public class MonitorLock : IDisposable
    Remarks

    Ie replace lock (o) {...} by using (new MonitorLock(o)) { ... }

    Constructors

    View Source

    MonitorLock(Object)

    Initializes a new instance of the MonitorLock class with an object to lock.

    Declaration
    public MonitorLock(object locker)
    Parameters
    Type Name Description
    System.Object locker

    The object to lock.

    Remarks

    Should always be used within a using block.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • MonitorLock(Object)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX