Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Side by Side Diff: experimental/visual_studio_plugin/third_party/Microsoft.VisualStudio.Project/Tracing.cs

Issue 10928195: First round of dead file removal (Closed) Base URL: https://github.com/samclegg/nativeclient-sdk.git@master
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 /// Copyright (c) Microsoft Corporation. All rights reserved.
2
3 using System.Diagnostics;
4
5 namespace Microsoft.VisualStudio.Project
6 {
7 internal class CCITracing
8 {
9 private CCITracing() { }
10
11 [ConditionalAttribute("Enable_CCIDiagnostics")]
12 static void InternalTraceCall(int levels)
13 {
14 System.Diagnostics.StackFrame stack;
15 stack = new System.Diagnostics.StackFrame(levels);
16 System.Reflection.MethodBase method = stack.GetMethod();
17 if(method != null)
18 {
19 string name = method.Name + " \tin class " + met hod.DeclaringType.Name;
20 System.Diagnostics.Trace.WriteLine("Call Trace: \t" + name);
21 }
22 }
23
24 [ConditionalAttribute("CCI_TRACING")]
25 static public void TraceCall()
26 {
27 // skip this one as well
28 CCITracing.InternalTraceCall(2);
29 }
30
31 [ConditionalAttribute("CCI_TRACING")]
32 static public void TraceCall(string strParameters)
33 {
34 CCITracing.InternalTraceCall(2);
35 System.Diagnostics.Trace.WriteLine("\tParameters: \t" + strParameters);
36 }
37
38 [ConditionalAttribute("CCI_TRACING")]
39 static public void Trace(System.Exception e)
40 {
41 CCITracing.InternalTraceCall(2);
42 System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + e.ToString());
43 }
44
45 [ConditionalAttribute("CCI_TRACING")]
46 static public void Trace(string strOutput)
47 {
48 System.Diagnostics.Trace.WriteLine(strOutput);
49 }
50
51 [ConditionalAttribute("CCI_TRACING")]
52 static public void TraceData(string strOutput)
53 {
54 System.Diagnostics.Trace.WriteLine("Data Trace: \t" + st rOutput);
55 }
56
57 [ConditionalAttribute("Enable_CCIFileOutput")]
58 [ConditionalAttribute("CCI_TRACING")]
59 static public void AddTraceLog(string strFileName)
60 {
61 TextWriterTraceListener tw = new TextWriterTraceListener ("c:\\mytrace.log");
62 System.Diagnostics.Trace.Listeners.Add(tw);
63 }
64 }
65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698