On Wed, Feb 08, 2006 at 07:48:31AM -0500, Jonathan Pryor wrote: > On Tue, 2006-02-07 at 22:46 -0500, joel reed wrote: > > The attached patch adds 3 .Net 2.0 enums and stubs out the > > methods and properties for the TraceSource class. I saw some > > stubbed out classes in the tree which used:
<snip Jonathan's helpful feedback> Jonathan, i think i've incorporated all your feedback into this patch. i only "#if false" the TraceSource class, as the other files are just enums. i hope that is appropriate. jr
diff --git a/mcs/class/System/System.Diagnostics/SourceLevels.cs b/mcs/class/System/System.Diagnostics/SourceLevels.cs new file mode 100644 index 0000000..42ad8b9 --- /dev/null +++ b/mcs/class/System/System.Diagnostics/SourceLevels.cs @@ -0,0 +1,45 @@ +// SourceLevels.cs +// Authors: +// Joel Reed ([EMAIL PROTECTED]) +// +// 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 { + + [FlagsAttribute] + public enum SourceLevels { + ActivityTracing= 0, + All = 1, + Critical = 2, + Error = 4, + Information = 8, + Off = 16, + Verbose = 32, + Warning = 64 + } + +} + +#endif 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 ([EMAIL PROTECTED]) +// +// 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.Diagnostics/TraceOptions.cs b/mcs/class/System/System.Diagnostics/TraceOptions.cs new file mode 100644 index 0000000..2b4397f --- /dev/null +++ b/mcs/class/System/System.Diagnostics/TraceOptions.cs @@ -0,0 +1,44 @@ +// TraceOptions.cs +// Authors: +// Joel Reed ([EMAIL PROTECTED]) +// +// 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 { + + [FlagsAttribute] + public enum TraceOptions { + Callstack = 0, + DateTime = 1, + LogicalOperationStack = 2, + None = 4, + ProcessId = 8, + ThreadId = 16, + Timestamp = 32, + } // TraceOptions + +} // System.Diagnostics + +#endif diff --git a/mcs/class/System/System.Diagnostics/TraceSource.cs b/mcs/class/System/System.Diagnostics/TraceSource.cs new file mode 100644 index 0000000..f351da5 --- /dev/null +++ b/mcs/class/System/System.Diagnostics/TraceSource.cs @@ -0,0 +1,117 @@ +// TraceSource.cs +// Authors: +// Joel Reed ([EMAIL PROTECTED]) +// +// 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. +// + +// comment out the stubs below till implemented +#if false + +#if NET_2_0 + +namespace System.Diagnostics { + + public class TraceSource { + + public TraceSource (string name) + { + this.name = name; + } + + public TraceSource (string name, SourceLevels defaultLevel) + { + this.name = name; + this.defaultLevel = defaultLevel; + } + + public void Close() + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + public void Flush() + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + [Conditional("TRACE")] + public void TraceData (TraceEventType eType, + int id, + Object data) + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + [Conditional("TRACE")] + public void TraceData (TraceEventType eType, + int id, + Object[] data) + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + [Conditional("TRACE")] + public void TraceEvent (TraceEventType eType, + int id) + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + [Conditional("TRACE")] + public void TraceInformation(string msg) + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + [Conditional("TRACE")] + public void TraceInformation(string fmt, Object[] args) + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + [Conditional("TRACE")] + public void TraceTransfer (int id, string msg, Guid relatedActivityId) + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + protected internal virtual string[] GetSupportedAttributes() + { + throw new NotImplementedException ("The method or operation is not implemented."); + } + + public string Name { + get {return name;} + set {name = value;} + } + + private string name; + private SourceLevels defaultLevel; + + } + +} + +#endif + +#endif diff --git a/mcs/class/System/System.dll.sources b/mcs/class/System/System.dll.sources index 2782d80..32a7d87 100644 --- a/mcs/class/System/System.dll.sources +++ b/mcs/class/System/System.dll.sources @@ -444,16 +444,20 @@ System.Diagnostics/ProcessStartInfo.cs System.Diagnostics/ProcessThreadCollection.cs System.Diagnostics/ProcessThread.cs System.Diagnostics/ProcessWindowStyle.cs +System.Diagnostics/SourceLevels.cs System.Diagnostics/Switch.cs System.Diagnostics/TextWriterTraceListener.cs System.Diagnostics/ThreadPriorityLevel.cs 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 System.Diagnostics/TraceListener.cs +System.Diagnostics/TraceOptions.cs +System.Diagnostics/TraceSource.cs System.Diagnostics/TraceSwitch.cs System/FileStyleUriParser.cs System/FtpStyleUriParser.cs
_______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list