Ejemplo n.º 1
0
		/// <summary>
		/// Inherits the contextual information from another thread.
		/// </summary>
		/// <param name="stack">The context stack to inherit.</param>
		/// <remarks>
		/// <note>
		/// <para>
		/// The NDC is deprecated and has been replaced by the <see cref="ThreadContext.Stacks"/>.
		/// The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
		/// </para>
		/// </note>
		/// <para>
		/// This thread will use the context information from the stack
		/// supplied. This can be used to initialize child threads with
		/// the same contextual information as their parent threads. These
		/// contexts will <b>NOT</b> be shared. Any further contexts that
		/// are pushed onto the stack will not be visible to the other.
		/// Call <see cref="CloneStack"/> to obtain a stack to pass to
		/// this method.
		/// </para>
		/// </remarks>
		/*[Obsolete("NDC has been replaced by ThreadContext.Stacks", true)]*/
		public static void Inherit(Stack stack) {
			ThreadContext.Stacks["NDC"].InternalStack = stack;
		}
Ejemplo n.º 2
0
 /// <summary>
 /// Inherits the contextual information from another thread.
 /// </summary>
 /// <param name="stack">The context stack to inherit.</param>
 /// <remarks>
 /// <note>
 /// <para>
 /// The NDC is deprecated and has been replaced by the <see cref="ThreadContext.Stacks"/>.
 /// The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
 /// </para>
 /// </note>
 /// <para>
 /// This thread will use the context information from the stack
 /// supplied. This can be used to initialize child threads with
 /// the same contextual information as their parent threads. These
 /// contexts will <b>NOT</b> be shared. Any further contexts that
 /// are pushed onto the stack will not be visible to the other.
 /// Call <see cref="CloneStack"/> to obtain a stack to pass to
 /// this method.
 /// </para>
 /// </remarks>
 /*[Obsolete("NDC has been replaced by ThreadContext.Stacks", true)]*/
 public static void Inherit(Stack stack)
 {
     ThreadContext.Stacks["NDC"].InternalStack = stack;
 }