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.
Namespace: Umbraco.Core.Logging
Assembly: Umbraco.Core.dll
Syntax
public class DisposableTimer : DisposableObjectSlim, IDisposable
Properties
View SourceStopwatch
Declaration
public Stopwatch Stopwatch { get; }
Property Value
Type | Description |
---|---|
System.Diagnostics.Stopwatch |
Methods
View SourceDisposeResources()
Disposes resources.
Declaration
protected override void DisposeResources()
Remarks
Overrides abstract class
Fail(String, 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.Exception | exception | The exception. |
Remarks
Completion of the timer will be reported as an error, with the specified message and exception.