Class GuardedValue<T>
Holds a value and cleans up when
Inheritance
System.Object
GuardedValue<T>
Namespace: InSync
Assembly: InSync.dll
Syntax
public class GuardedValue<T> : IDisposable
Type Parameters
| Name | Description |
|---|---|
| T | The type of the value. |
Constructors
GuardedValue(T, Nullable<Action>)
Initializes a new GuardedValue<T> with the specified value and clean-up action.
Declaration
public GuardedValue(T value, Action? dispose)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value to hold. |
| System.Nullable<Action> | dispose | The clean-up action. |
Properties
Value
Gets the value it is holding.
Declaration
public T Value { get; }
Property Value
| Type | Description |
|---|---|
| T |
Methods
Dispose()
Performs the clean-up action.
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |