Table of Contents

Class ExecutableContext

Namespace
Executables.Context
Assembly
executables.dll

Provides access to the current executable context through Current.

public sealed class ExecutableContext : IDisposable, IReadonlyContext, IFormattable
Inheritance
ExecutableContext
Implements
Inherited Members

Properties

ContextId

Unique context identifier.

public long ContextId { get; }

Property Value

long

CorrelationId

Correlation identifier shared by related contexts.

public Guid CorrelationId { get; }

Property Value

Guid

Current

Current ambient executable context.

public static IReadonlyContext Current { get; }

Property Value

IReadonlyContext

Depth

Nesting depth relative to the root context.

public int Depth { get; }

Property Value

int

Name

Context name.

public string Name { get; set; }

Property Value

string

Parent

Parent context, or null for the root context.

public IReadonlyContext Parent { get; }

Property Value

IReadonlyContext

Root

Root context of the current hierarchy.

public IReadonlyContext Root { get; }

Property Value

IReadonlyContext

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

ToString(string, IFormatProvider)

Formats the value of the current instance using the specified format.

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format to use.

-or-

A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.

-or-

A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

TryGetLocal<T>(object, out T)

Tries to get a value from the current context only.

public bool TryGetLocal<T>(object key, out T value)

Parameters

key object
value T

Returns

bool

Type Parameters

T

TryGet<T>(object, out T)

Tries to get a value from the current context or its ancestors.

public bool TryGet<T>(object key, out T value)

Parameters

key object
value T

Returns

bool

Type Parameters

T