Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2007-05-17 21:10:25 +0400
committerAtsushi Eno <atsushieno@gmail.com>2007-05-17 21:10:25 +0400
commit720ddca1bdf093300bcbe87bb719c81026bad836 (patch)
treeadb26ba0489785b9ff52f53d72b796e0a5ff130d /mcs/class/System/System.Diagnostics/TraceEventCache.cs
parentf32fe807d9103ed38fdab1b72c822adcfee99130 (diff)
2007-05-17 Atsushi Enomoto <atsushi@ximian.com>
* TraceOptions.cs : new enum. * TraceListener.cs : support TraceOutputOptions. Fixed missing NET_2_0 condition in TARGET_JVM section. * TraceSwitch.cs, BooleanSwitch.cs : Added missing constructors and OnValueChanged(). * Trace.cs, TraceImpl.cs : Added CorrelationManager and UseGlobalLock. * TraceEventCache.cs : initialize property values at construction. * Switch.cs : added XmlIgnore on Attributes. * SwitchesTest.cs : added tests for BooleanSwitch Value. * TraceListenerTest.cs : added test for TraceOutputOptions. * System.dll.sources : added TraceOptions.cs. svn path=/trunk/mcs/; revision=77581
Diffstat (limited to 'mcs/class/System/System.Diagnostics/TraceEventCache.cs')
-rw-r--r--mcs/class/System/System.Diagnostics/TraceEventCache.cs26
1 files changed, 14 insertions, 12 deletions
diff --git a/mcs/class/System/System.Diagnostics/TraceEventCache.cs b/mcs/class/System/System.Diagnostics/TraceEventCache.cs
index 34c0b53703e..193daf5cd76 100644
--- a/mcs/class/System/System.Diagnostics/TraceEventCache.cs
+++ b/mcs/class/System/System.Diagnostics/TraceEventCache.cs
@@ -41,24 +41,26 @@ namespace System.Diagnostics
{
DateTime started;
CorrelationManager manager;
+ string callstack, thread;
+ int process;
+ long timestamp;
public TraceEventCache ()
{
- started = DateTime.MinValue;
- manager = new CorrelationManager ();
+ started = DateTime.Now;
+ manager = Trace.CorrelationManager;
+ callstack = Environment.StackTrace;
+ timestamp = Stopwatch.GetTimestamp ();
+ thread = Thread.CurrentThread.Name;
+ process = Process.GetCurrentProcess ().Id;
}
- [MonoTODO]
public string Callstack {
- get { throw new NotImplementedException (); }
+ get { return callstack; }
}
public DateTime DateTime {
- get {
- if (started == DateTime.MinValue)
- started = DateTime.Now;
- return started;
- }
+ get { return started; }
}
public Stack LogicalOperationStack {
@@ -66,15 +68,15 @@ namespace System.Diagnostics
}
public int ProcessId {
- get { return Process.GetCurrentProcess ().Id; }
+ get { return process; }
}
public string ThreadId {
- get { return Thread.CurrentThread.Name; }
+ get { return thread; }
}
public long Timestamp {
- get { return Stopwatch.GetTimestamp (); }
+ get { return timestamp; }
}
}
}