Microsoft.VisualStudio.Project.CciTracing.InternalTraceCall C# (CSharp) Method

InternalTraceCall() private method

private InternalTraceCall ( int levels ) : void
levels int
return void
        private static void InternalTraceCall(int levels)
        {
            System.Diagnostics.StackFrame stack;
            stack = new System.Diagnostics.StackFrame(levels);
            System.Reflection.MethodBase method = stack.GetMethod();
            if(method != null)
            {
                string name = method.Name + " \tin class " + method.DeclaringType.Name;
                System.Diagnostics.Trace.WriteLine("Call Trace: \t" + name);
            }
        }

Usage Example

Esempio n. 1
0
        public static void Trace(System.Exception exception)
        {
            if (exception == null)
            {
                throw new ArgumentNullException("exception");
            }

            CciTracing.InternalTraceCall(2);
            System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + exception.ToString());
        }
All Usage Examples Of Microsoft.VisualStudio.Project.CciTracing::InternalTraceCall