AtomicComposition.TryGetValue Method

Definition

Gets a value saved by the SetValue(Object, Object) method.

Overloads

TryGetValue<T>(Object, T)

Gets a value saved by the SetValue(Object, Object) method.

TryGetValue<T>(Object, Boolean, T)

Gets a value saved by the SetValue(Object, Object) method, with the option of not searching parent transactions.

TryGetValue<T>(Object, T)

Source:
AtomicComposition.cs
Source:
AtomicComposition.cs
Source:
AtomicComposition.cs

Gets a value saved by the SetValue(Object, Object) method.

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

Type Parameters

T

The type of the value to be retrieved.

Parameters

key
Object

The key to retrieve from.

value
T

The retrieved value.

Returns

true if the value was successfully retrieved; otherwise, false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

TryGetValue<T>(Object, Boolean, T)

Source:
AtomicComposition.cs
Source:
AtomicComposition.cs
Source:
AtomicComposition.cs

Gets a value saved by the SetValue(Object, Object) method, with the option of not searching parent transactions.

public bool TryGetValue<T> (object key, bool localAtomicCompositionOnly, out T value);

Type Parameters

T

The type of the value to be retrieved.

Parameters

key
Object

The key to retrieve from.

localAtomicCompositionOnly
Boolean

true to exclude parent transactions; otherwise, false.

value
T

The retrieved value.

Returns

true if the value was successfully retrieved; otherwise, false.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)