Table of Contents

Class RuntimeContextSlot<T>

Namespace
OpenTelemetry.Context
Assembly
OpenTelemetry.Api.dll

The abstract context slot.

public abstract class RuntimeContextSlot<T> : IDisposable

Type Parameters

T

The type of the underlying value.

Inheritance
RuntimeContextSlot<T>
Implements
Derived
Inherited Members

Constructors

RuntimeContextSlot(string)

Initializes a new instance of the RuntimeContextSlot<T> class.

protected RuntimeContextSlot(string name)

Parameters

name string

The name of the context slot.

Properties

Name

Gets the name of the context slot.

public string Name { get; }

Property Value

string

Methods

Dispose()

public void Dispose()

Dispose(bool)

Releases the unmanaged resources used by this class and optionally releases the managed resources.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Get()

Get the value from the context slot.

public abstract T Get()

Returns

T

The value retrieved from the context slot.

Set(T)

Set the value to the context slot.

public abstract void Set(T value)

Parameters

value T

The value to be set.