src/Misc/EFTools/XmlCore/Model/Eventing/EfiTransactionContext.cs
/// <summary>
///     Lookup the value associated with a specified key in the transaction context.
/// </summary>
/// <typeparam name="T">The expected type of the value associated with the specified key</typeparam>
/// <param name="key">The key to lookup in the context</param>
/// <param name="value">Receives the value associated with the specified key, or the default value for T if the key is not found</param>
/// <returns>Whether or not the context contained a value with the specified key.</returns>
Lookup the value associated with a specified key in the transaction context.
Lookup the value associated with a specified key in the transaction context .
public bool TryGetValue<T>(string key, out T value) where T : ITransactionContextItem
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            ITransactionContextItem result;
            if (_contextInfo.TryGetValue(key, out result)
                && result is T)
            {
                value = (T)result;
                return true;
            }
            value = default(T);
            return false;
        }
public bool TryGetValue < T > ( string key , out T value ) where T : ITransactionContextItem { if ( key == null ) { throw new ArgumentNullException ( " " ) ; } ITransactionContextItem result ; if ( _contextInfo . TryGetValue ( key , out result ) && result is T ) { value = ( T ) result ; return true ; } value = default ( T ) ; return false ; }
Lookup the value associated with a specified key in the transaction context.
Lookup the value associated with a specified key in the transaction context .
Whether or not the context contained a value with the specified key.
Whether or not the context contained a value with the specified key .
key
string
The key to lookup in the context
The key to lookup in the context
T
out
value
Receives the value associated with the specified key, or the default value for T if the key is not found
Receives the value associated with the specified key or the default value for T if the key is not found
typeparam
The expected type of the value associated with the specified key
The expected type of the value associated with the specified key