/// <summary>
        /// Initializes a new instance of the <see cref="TraceMethod"/> class.
        /// </summary>
        /// <param name="ri">The ri.</param>
        /// <param name="message">The message.</param>
        internal TraceMethod(ReflectInsight ri, String message)
        {
            RI       = ri;
            Message  = message ?? "(null)";
            Disposed = false;

            ControlValues = RequestManager.GetRequestObject();
            TraceStates   = ControlValues.GetState <TraceMethodState>("TraceMethodState");

            if (TraceStates == null)
            {
                // must be parent trace method
                TraceStates = new TraceMethodState()
                {
                    TraceLevel = 0, ExceptionHandled = false
                };
                ControlValues.AddState("TraceMethodState", TraceStates);
            }

            RICustomData cData = null;

            if (cData == null)
            {
                RI.EnterMethod(Message);
            }
            else
            {
                FSendMethodInfo.Invoke(RI, new object[] { MessageType.EnterMethod, message, cData, new object[] { } });
            }

            LastIndentLevel = ReflectInsight.IndentLevel;
            TraceStates.TraceLevel++;
        }
 /// <summary>
 /// Attaches to request.
 /// </summary>
 /// <param name="caption">The caption.</param>
 /// <param name="nvcollection">The nvcollection.</param>
 static public void AttachToRequest(String caption, NameValueCollection nvcollection)
 {
     RequestManager.GetRequestObject().RequestMessageProperties.Add(caption, nvcollection);
 }
 /// <summary>
 /// Attaches to request.
 /// </summary>
 /// <param name="caption">The caption.</param>
 /// <param name="property">The property.</param>
 /// <param name="value">The value.</param>
 static public void AttachToRequest(String caption, String property, String value)
 {
     RequestManager.GetRequestObject().RequestMessageProperties.Add(caption, property, value);
 }
 /// <summary>
 /// Clears the request properties.
 /// </summary>
 static public void ClearRequestProperties()
 {
     RequestManager.GetRequestObject().RequestMessageProperties.Clear();
 }
 /// <summary>
 /// Clears the request properties.
 /// </summary>
 /// <param name="caption">The caption.</param>
 static public void ClearRequestProperties(String caption)
 {
     RequestManager.GetRequestObject().RequestMessageProperties.Clear(caption);
 }
 /// <summary>
 /// Clears the single message property.
 /// </summary>
 /// <param name="caption">The caption.</param>
 /// <param name="property">The property.</param>
 static public void ClearSingleMessageProperty(String caption, String property)
 {
     RequestManager.GetRequestObject().SingleMessageProperties.Clear(caption, property);
 }