diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2007-05-14 12:02:36 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2007-05-14 12:02:36 +0400 |
commit | 1428fe4b97954ac5daf0914eca1163b67c4648bc (patch) | |
tree | a3c0a5044093e79905527e1dcdc50b9c207cffe1 /mcs/class/System/System.Diagnostics/DelimitedListTraceListener.cs | |
parent | f11f1edba132aa40bd884f0282302483d9b2a562 (diff) |
2007-05-14 Atsushi Enomoto <atsushi@ximian.com>
* EventTypeFilter.cs
TraceFilter.cs
SourceFilter.cs
SwitchLevelAttribute.cs
DelimitedListTraceListener.cs
SwitchAttribute.cs : new files in 2.0.
* DiagnosticsConfigurationHandler.cs : partial support for named
shared listeners.
* XmlWriterTraceListener.cs : cosmetic corcompare fixes. Added
missing todos.
* TraceListener.cs : added missing 2.0 stuff. Implemented Filter.
* DefaultTraceListener.cs : trivial ComVisible fix.
* DiagnosticsConfigurationHandlerTest.cs : in 2.0 configuration item
listeners/add/@type is optional (for named shared listener support).
* System.dll.sources :
Added EventTypeFilter.cs, TraceFilter.cs, SourceFilter.cs,
DelimitedListTraceListener.cs, SwitchAttribute.cs and
SwitchLevelAttribute.cs in sys.diagnostics.
svn path=/trunk/mcs/; revision=77331
Diffstat (limited to 'mcs/class/System/System.Diagnostics/DelimitedListTraceListener.cs')
-rw-r--r-- | mcs/class/System/System.Diagnostics/DelimitedListTraceListener.cs | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/mcs/class/System/System.Diagnostics/DelimitedListTraceListener.cs b/mcs/class/System/System.Diagnostics/DelimitedListTraceListener.cs new file mode 100644 index 00000000000..ff9ab7384cf --- /dev/null +++ b/mcs/class/System/System.Diagnostics/DelimitedListTraceListener.cs @@ -0,0 +1,123 @@ +// +// DelimitedListTraceFilter.cs +// +// Author: +// Atsushi Enomoto <atsushi@ximian.com> +// +// (C) 2007 Novell, Inc. +// + +// +// 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 + +using System; +using System.IO; +using System.Collections; +using System.Diagnostics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +namespace System.Diagnostics +{ + public class DelimitedListTraceListener : TextWriterTraceListener + { + public DelimitedListTraceListener (string fileName) + : base (fileName) + { + } + + public DelimitedListTraceListener (string fileName, string name) + : base (fileName, name) + { + } + + public DelimitedListTraceListener (Stream stream) + : base (stream) + { + } + + public DelimitedListTraceListener (Stream stream, string name) + : base (stream, name) + { + } + + public DelimitedListTraceListener (TextWriter writer) + : base (writer) + { + } + + public DelimitedListTraceListener (TextWriter writer, string name) + : base (writer, name) + { + } + + static readonly string [] attributes = new string [] {"delimiter"}; + string delimiter = ";"; + + public string Delimiter { + get { return delimiter; } + set { + if (value == null) + throw new ArgumentNullException ("value"); + delimiter = value; + } + } + + protected override string [] GetSupportedAttributes () + { + return attributes; + } + + [MonoTODO] + public override void TraceData (TraceEventCache eventCache, + string source, TraceEventType eventType, + int id, object data) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public override void TraceData (TraceEventCache eventCache, + string source, TraceEventType eventType, + int id, params object [] data) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public override void TraceEvent (TraceEventCache eventCache, + string source, TraceEventType eventType, + int id, string message) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public override void TraceEvent (TraceEventCache eventCache, + string source, TraceEventType eventType, + int id, string format, params object [] args) + { + throw new NotImplementedException (); + } + } +} +#endif |