[Mono-dev] [PATCH]TraceEventType

joel reed joel.reed at ddiworld.com
Tue Jan 24 22:46:03 EST 2006


On Mon, Jan 23, 2006 at 05:29:34AM -0500, Jonathan Pryor wrote:
> On Sun, 2006-01-22 at 22:13 -0500, joel reed wrote:
> > I'd like to implement System.Diagnostics.TraceSource if no one has already 
> > planned to do so. This is a 2.0 class.
> 
> > I've only submitted one bug fix previously to the mono project,
> > so I thought I'd post the patch for TraceEventType, in the hopes
> > that it would either be applied or else get needed feedback, and
> > also let the list know I'd like to do TraceSource.
> 
> Feedback: don't use XML documentation comments.  Documentation is kept
> entirely separate, in the `monodoc' svn module.  The documentation is
> kept separate for translation reasons -- we can't have e.g. en and fr
> documentation within the same source file.
> 
> You should also use tabs, not spaces, as is described here:
> 
> 	http://mono.myrealbox.com/source/trunk/mcs/class/README
> 
> You also forgot a copyright statement in the file header, e.g.
> 
> 	// System.Diagnostics/TraceEventType.cs
> 	//
> 	// Authors:
> 	//   Joel Reed (joel.reed at ddiworld.com)
> 	//
> 	// Copyright (C) 2006 Joel Reed
> 	//
> 	// Permission is hereby granted, free of charge...

thanks Jon for the feedback, i've made all suggested changes
and attached a patch below. (i just deleted comments for now
till i figure out monodoc)

jr
-------------- next part --------------
diff --git a/mcs/class/System/System.Diagnostics/TraceEventType.cs b/mcs/class/System/System.Diagnostics/TraceEventType.cs
new file mode 100644
index 0000000..d082361
--- /dev/null
+++ b/mcs/class/System/System.Diagnostics/TraceEventType.cs
@@ -0,0 +1,46 @@
+// TraceEventType.cs
+// Authors:
+//   Joel Reed (joel.reed at ddiworld.com)
+//
+// Copyright (C) 2006 Joel Reed
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+
+namespace System.Diagnostics {
+
+	public enum TraceEventType {
+		CriticalFatal = 0,
+		Error = 1,
+		Information = 2,
+		Resume = 3,
+		Start = 4,
+		Stop = 5,
+		Suspend = 6,
+		Transfer = 7,
+		Verbose = 8,
+		Warning = 9
+	} // TraceEventType
+
+} // System.Diagnostics
+
+#endif
diff --git a/mcs/class/System/System.dll.sources b/mcs/class/System/System.dll.sources
index 2782d80..dc39513 100644
--- a/mcs/class/System/System.dll.sources
+++ b/mcs/class/System/System.dll.sources
@@ -450,6 +450,7 @@ System.Diagnostics/ThreadPriorityLevel.c
 System.Diagnostics/ThreadState.cs
 System.Diagnostics/ThreadWaitReason.cs
 System.Diagnostics/Trace.cs
+System.Diagnostics/TraceEventType.cs
 System.Diagnostics/TraceImpl.cs
 System.Diagnostics/TraceLevel.cs
 System.Diagnostics/TraceListenerCollection.cs


More information about the Mono-devel-list mailing list