Search Results for

    Show / Hide Table of Contents
    View Source

    Class DisposableTimer

    Starts the timer and invokes a callback upon disposal. Provides a simple way of timing an operation by wrapping it in a

    using
    (C#) statement.

    Inheritance
    System.Object
    DisposableObjectSlim
    Namespace: Umbraco.Cms.Core.Logging
    Assembly: Umbraco.Core.dll
    Syntax
    public class DisposableTimer : DisposableObjectSlim

    Properties

    View Source

    Stopwatch

    Declaration
    public Stopwatch Stopwatch { get; }
    Property Value
    Type Description
    System.Diagnostics.Stopwatch

    Methods

    View Source

    DisposeResources()

    Disposes resources.

    Declaration
    protected override void DisposeResources()
    Remarks

    Overrides abstract class which handles required locking.

    View Source

    Fail(String, Nullable<Exception>)

    Reports a failure.

    Declaration
    public void Fail(string failMessage = null, Exception? exception = null)
    Parameters
    Type Name Description
    System.String failMessage

    The fail message.

    System.Nullable<Exception> exception

    The exception.

    Remarks

    Completion of the timer will be reported as an error, with the specified message and exception.

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • Stopwatch
    • Methods
      • DisposeResources()
      • Fail(String, Nullable<Exception>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX