/// <summary> /// Clears the logical thread context variables /// </summary> public void Clear() { Context.Clear(); }
/// <summary> /// Removes a variable from the logical thread context by key /// </summary> /// <param name="key">The key of the variable to remove</param> public void Remove(string key) { Context.Remove(key); }
/// <summary> /// Gets the value of a variable within the logical thread context /// </summary> /// <param name="key">The key of the variable to get</param> /// <returns>The value or null if not found</returns> public object Get(string key) { return(Context.GetObject(key)); }
/// <summary> /// Checks if a variable is set within the logical thread context /// </summary> /// <param name="key">The key of the variable to check for</param> /// <returns>True if the variable is set</returns> public bool Contains(string key) { return(Context.Contains(key)); }
/// <summary> /// Sets the value of a new or existing variable within the logical thread context /// </summary> /// <param name="key">The key of the variable that is to be added</param> /// <param name="value">The value to add</param> public void Set(string key, object value) { Context.Set(key, value); }