Class Reserved<T>
A wrapper around a shared pointer that reduces the reference count once out of scope.
Inherited Members
Namespace: Microsoft.XboxStudios.ClientManager
Assembly: ClientManager.Abstractions.dll
Syntax
public class Reserved<T> : IDisposable, IAsyncDisposable
Type Parameters
Name | Description |
---|---|
T | The type of the value to reserve. |
Remarks
Initializes a new instance of the Reserved<T> class.
Constructors
View SourceReserved(ISharedRef<T>)
A wrapper around a shared pointer that reduces the reference count once out of scope.
Declaration
public Reserved(ISharedRef<T> sharedRef)
Parameters
Type | Name | Description |
---|---|---|
ISharedRef<T> | sharedRef | A ISharedRef<TValue> to |
Remarks
Initializes a new instance of the Reserved<T> class.
Properties
View SourceValue
Gets the value of the reserved object.
Declaration
public T Value { get; }
Property Value
Type | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | is thrown if this class is disposed. |
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Declaration
public ValueTask DisposeAsync()
Returns
Type | Description |
---|---|
ValueTask | A task that represents the asynchronous dispose operation. |