• Performance
  • API Documentation
  • Source Code
Show / Hide Table of Contents
  • InSync
    • AsyncSynchronized
    • AsyncSynchronized<T>
    • GuardedValue<T>
    • IAsyncSynchronized<T>
    • IBareAsyncLock
    • IBareAsyncLock<T>
    • IBareLock
    • IBareLock<T>
    • ISynchronized<T>
    • LockException
    • MultiSync
    • ReaderSynchronized<TRead>
    • ReaderWriterSynchronized<T>
    • ReaderWriterSynchronized<TWrite, TRead>
    • ReaderWriterSynchronizedFactory
    • Synchronized
    • Synchronized<T>
    • TimingMethod
    • UnlockException
    • UpgradeableReaderSynchronized<TRead>
    • ValueContainer<T>

Class GuardedValue<T>

Holds a value and cleans up when is called.

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
In This Article
Back to top Generated by DocFX