/// <summary>
        /// Creates a clone of this InvocationContext, changing the type of the context.
        /// </summary>
        /// <param name="contextType">The new InvocationContextType.</param>
        /// <returns>A clone of this InvocationContext with a new context type.</returns>
        internal InvocationContext SpecifyType(InvocationContextTypes contextType)
        {
            InvocationContext context = (InvocationContext)this.MemberwiseClone();

            context.ContextType = contextType;
            return(context);
        }
 /// <summary>
 /// Initializes a new instance of the TraceContextAttribute class.
 /// </summary>
 /// <param name="enabledFor">The types of invocations to enable context logging.</param>
 public TraceContextAttribute(InvocationContextTypes enabledFor)
 {
     EnabledFor = enabledFor;
 }
 /// <summary>
 /// Initializes a new instance of the InvocationContext class.
 /// </summary>
 /// <param name="methodInfo">The handle of the method being invoked.</param>
 /// <param name="contextType">The context type for this invocation.</param>
 internal InvocationContext(MethodInfo methodInfo, InvocationContextTypes contextType)
 {
     MethodInfo  = methodInfo;
     ContextType = contextType;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the TraceContextAttribute class.
 /// </summary>
 /// <param name="enabledFor">The types of invocations to enable context logging.</param>
 public TraceContextAttribute(InvocationContextTypes enabledFor)
 {
     EnabledFor = enabledFor;
 }
		/// <summary>
		/// Creates a clone of this InvocationContext, changing the type of the context.
		/// </summary>
		/// <param name="contextType">The new InvocationContextType.</param>
		/// <returns>A clone of this InvocationContext with a new context type.</returns>
		internal InvocationContext SpecifyType(InvocationContextTypes contextType)
		{
			InvocationContext context = (InvocationContext)this.MemberwiseClone();
			context.ContextType = contextType;
			return context;
		}
		/// <summary>
		/// Initializes a new instance of the InvocationContext class.
		/// </summary>
		/// <param name="methodInfo">The handle of the method being invoked.</param>
		/// <param name="contextType">The context type for this invocation.</param>
		internal InvocationContext(MethodInfo methodInfo, InvocationContextTypes contextType)
		{
			MethodInfo = methodInfo;
			ContextType = contextType;
		}