diff options
author | Andreas N <andreas@mono-cvs.ximian.com> | 2003-07-06 03:16:07 +0400 |
---|---|---|
committer | Andreas N <andreas@mono-cvs.ximian.com> | 2003-07-06 03:16:07 +0400 |
commit | e1a881b8f8050e148a99af9a4c78cebdc6362ffb (patch) | |
tree | b5057de20a7619c9cb4b917636050c45bad8d757 /mcs/class/System/System.Diagnostics | |
parent | 55dfaa78bb92f744e29d35f819b1f943bcb01869 (diff) |
2003-07-05 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* InstanceDataCollectionCollection.cs: Corrected wrong signature
* EventLog.cs: Missing attributes added, redirected some class members
* EventLogEntry.cs: Missing attributes added
* EventLogInstaller.cs: Made internal
svn path=/trunk/mcs/; revision=15968
Diffstat (limited to 'mcs/class/System/System.Diagnostics')
5 files changed, 335 insertions, 285 deletions
diff --git a/mcs/class/System/System.Diagnostics/ChangeLog b/mcs/class/System/System.Diagnostics/ChangeLog index 4510bb84903..c0e6eda5728 100644 --- a/mcs/class/System/System.Diagnostics/ChangeLog +++ b/mcs/class/System/System.Diagnostics/ChangeLog @@ -1,3 +1,10 @@ +2003-07-05 Andreas Nahr <ClassDevelopment@A-SoftTech.com> + + * InstanceDataCollectionCollection.cs: Corrected wrong signature + * EventLog.cs: Missing attributes added, redirected some class members + * EventLogEntry.cs: Missing attributes added + * EventLogInstaller.cs: Made internal + 2003-07-02 Andreas Nahr <ClassDevelopment@A-SoftTech.com> * CounterCreationData.cs: Added missing attributes diff --git a/mcs/class/System/System.Diagnostics/EventLog.cs b/mcs/class/System/System.Diagnostics/EventLog.cs index 477191cd8af..e88b873f151 100644 --- a/mcs/class/System/System.Diagnostics/EventLog.cs +++ b/mcs/class/System/System.Diagnostics/EventLog.cs @@ -3,18 +3,29 @@ // // Authors: // Jonathan Pryor (jonpryor@vt.edu) +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) // // (C) 2002 +// (C) 2003 Andreas Nahr // using System; using System.Diagnostics; using System.ComponentModel; +using System.ComponentModel.Design; namespace System.Diagnostics { [MonoTODO("This class is just stubbed out")] - public class EventLog : Component, ISupportInitialize { + [DefaultEvent ("EntryWritten"), DesignerCategory ("Category"), InstallerType (typeof (EventLogInstaller))] + #if (NET_1_0) + [Designer ("Microsoft.VisualStudio.Install.EventLogInstallableComponentDesigner, Microsoft.VisualStudio, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (IDesigner))] + #endif + #if (NET_1_1) + [Designer ("Microsoft.VisualStudio.Install.EventLogInstallableComponentDesigner, Microsoft.VisualStudio, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof (IDesigner))] + #endif + public class EventLog : Component, ISupportInitialize + { private string source; private string logName; @@ -41,230 +52,240 @@ namespace System.Diagnostics { this.logName = logName; } -// [MonoTODO] -// public bool EnableRaisingEvents { -// get {return false;} -// set {/* ignore */} -// } -// -// [MonoTODO] -// public EventLogEntryCollection Entries { -// get {return null;} -// } -// -// [MonoTODO] -// public string Log { -// get {return log;} -// set {log = value;} -// } -// -// [MonoTODO] -// public string LogDisplayName { -// get {return "";} -// } -// -// [MonoTODO] -// public string MachineName { -// get {return machineName;} -// set {/* ignore */} -// } -// -// [MonoTODO] -// public string Source { -// get {return source;} -// set {/* ignore */} -// } -// -// [MonoTODO] -// public ISynchronizeInvoke SynchronizingObject { -// get {return null;} -// set {/* ignore */} -// } -// + [MonoTODO] + [Browsable (false), DefaultValue (false)] + [MonitoringDescription ("If enabled raises event when a log is written.")] + public bool EnableRaisingEvents { + get {return false;} + set {/* ignore */} + } + + [MonoTODO] + [Browsable (false), DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)] + [MonitoringDescription ("The entries in the log.")] + public EventLogEntryCollection Entries { + get {return null;} + } + + [MonoTODO] + [ReadOnly (true), DefaultValue (""), RecommendedAsConfigurable (true)] + #if (NET_1_0) + [TypeConverter ("System.Diagnostics.Design.LogConverter, System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + #endif + #if (NET_1_1) + [TypeConverter ("System.Diagnostics.Design.LogConverter, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + #endif + [MonitoringDescription ("Name of the log that is read and written.")] + public string Log { + get {return logName;} + set {logName = value;} + } + + [MonoTODO] + [Browsable (false)] + public string LogDisplayName { + get {return "";} + } + + [MonoTODO] + [ReadOnly (true), DefaultValue ("."), RecommendedAsConfigurable (true)] + [MonitoringDescription ("Name of the machine that this log get written to.")] + public string MachineName { + get {return machineName;} + set {/* ignore */} + } + + [MonoTODO] + [ReadOnly (true), DefaultValue (""), RecommendedAsConfigurable (true)] + #if (NET_1_0) + [TypeConverter ("System.Diagnostics.Design.StringValueConverter, System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + #endif + #if (NET_1_1) + [TypeConverter ("System.Diagnostics.Design.StringValueConverter, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + #endif + [MonitoringDescription ("The application name that writes the log.")] + public string Source { + get {return source;} + set {/* ignore */} + } + + [MonoTODO] + [Browsable (false), DefaultValue (null)] + [MonitoringDescription ("An object that synchronizes event handler calls.")] + public ISynchronizeInvoke SynchronizingObject { + get {return null;} + set {/* ignore */} + } + [MonoTODO] public void BeginInit() { throw new NotImplementedException (); } -// [MonoTODO] -// public void Clear() -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public void Close() -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void CreateEventSource(string source, -// string logName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void CreateEventSource(string source, -// string logName, -// string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void Delete(string logName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void Delete(string logName, string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void DeleteEventSource(string source) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void DeleteEventSource(string source, -// string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// protected override void Dispose(bool disposing) -// { -// throw new NotImplementedException (); -// } -// + [MonoTODO] + public void Clear() + { + throw new NotImplementedException (); + } + + [MonoTODO] + public void Close() + { + throw new NotImplementedException (); + } + + public static void CreateEventSource(string source, string logName) + { + CreateEventSource (source, logName, "."); + } + + [MonoTODO] + public static void CreateEventSource(string source, + string logName, + string machineName) + { + throw new NotImplementedException (); + } + + public static void Delete(string logName) + { + Delete (logName, "."); + } + + [MonoTODO] + public static void Delete(string logName, string machineName) + { + throw new NotImplementedException (); + } + + public static void DeleteEventSource(string source) + { + DeleteEventSource (source, "."); + } + + [MonoTODO] + public static void DeleteEventSource(string source, + string machineName) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected override void Dispose(bool disposing) + { + throw new NotImplementedException (); + } + [MonoTODO] public void EndInit() { throw new NotImplementedException (); } -// [MonoTODO] -// public static bool Exists(string logName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static bool Exists(string logName, string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static EventLog[] GetEventLogs() -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static EventLog[] GetEventLogs(string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static string LogNameFromSourceName(string source, -// string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static bool SourceExists(string source) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static bool SourceExists(string source, -// string machineName) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public void WriteEntry(string message) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public void WriteEntry(string message, EventLogEntryType type) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void WriteEntry(string source, string message) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public void WriteEntry(string message, EventLogEntryType type, -// int eventID) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void WriteEntry(string source, string message, -// EventLogEntryType type) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public void WriteEntry(string message, EventLogEntryType type, -// int eventID, -// short category) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void WriteEntry(string source, string message, -// EventLogEntryType type, int eventID) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public void WriteEntry(string message, EventLogEntryType type, -// int eventID, -// short category, byte[] rawData) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void WriteEntry(string source, string message, -// EventLogEntryType type, int eventID, short category) -// { -// throw new NotImplementedException (); -// } -// -// [MonoTODO] -// public static void WriteEntry(string source, string message, -// EventLogEntryType type, int eventID, short category, -// byte[] rawData) -// { -// throw new NotImplementedException (); -// } + public static bool Exists(string logName) + { + return Exists (logName, "."); + } + + [MonoTODO] + public static bool Exists(string logName, string machineName) + { + throw new NotImplementedException (); + } + + public static EventLog[] GetEventLogs() + { + return GetEventLogs ("."); + } + + [MonoTODO] + public static EventLog[] GetEventLogs(string machineName) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public static string LogNameFromSourceName(string source, + string machineName) + { + throw new NotImplementedException (); + } + + public static bool SourceExists(string source) + { + return SourceExists (source, "."); + } + + [MonoTODO] + public static bool SourceExists(string source, string machineName) + { + throw new NotImplementedException (); + } + + public void WriteEntry(string message) + { + WriteEntry (message, EventLogEntryType.Information); + } + + public void WriteEntry(string message, EventLogEntryType type) + { + WriteEntry (message, type, 0); + } + + public void WriteEntry(string message, EventLogEntryType type, + int eventID) + { + WriteEntry (message, type, eventID, 0); + } + + public void WriteEntry(string message, EventLogEntryType type, + int eventID, + short category) + { + WriteEntry (message, type, eventID, category, null); + } + + [MonoTODO] + public void WriteEntry(string message, EventLogEntryType type, + int eventID, + short category, byte[] rawData) + { + throw new NotImplementedException (); + } + + public static void WriteEntry(string source, string message) + { + WriteEntry (source, message, EventLogEntryType.Information); + } + + public static void WriteEntry(string source, string message, + EventLogEntryType type) + { + WriteEntry (source, message, EventLogEntryType.Information, 0); + } + + public static void WriteEntry(string source, string message, + EventLogEntryType type, int eventID) + { + WriteEntry (source, message, EventLogEntryType.Information, eventID, 0); + } + + public static void WriteEntry(string source, string message, + EventLogEntryType type, int eventID, short category) + { + WriteEntry (source, message, EventLogEntryType.Information, eventID, category, null); + } + + [MonoTODO] + public static void WriteEntry(string source, string message, + EventLogEntryType type, int eventID, short category, + byte[] rawData) + { + throw new NotImplementedException (); + } + [MonitoringDescription ("Raised for each eventlog entry written.")] public event EntryWrittenEventHandler EntryWritten; } } diff --git a/mcs/class/System/System.Diagnostics/EventLogEntry.cs b/mcs/class/System/System.Diagnostics/EventLogEntry.cs index 32fb4533254..824cd57b4d2 100644 --- a/mcs/class/System/System.Diagnostics/EventLogEntry.cs +++ b/mcs/class/System/System.Diagnostics/EventLogEntry.cs @@ -3,8 +3,10 @@ // // Authors: // Jonathan Pryor (jonpryor@vt.edu) +// Andreas Nahr (ClassDevelopment@A-SoftTech.com) // // (C) 2002 +// (C) 2003 Andreas Nahr // using System; @@ -16,6 +18,7 @@ namespace System.Diagnostics { [Serializable] [MonoTODO("Just stubbed out")] + [ToolboxItem (""), DesignTimeVisible (false), DesignerCategory ("Category")] public sealed class EventLogEntry : Component, ISerializable { [MonoTODO] @@ -23,77 +26,96 @@ namespace System.Diagnostics { { } -// [MonoTODO] -// public string Categery { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public short CategoryNumber { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public byte[] Data { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public EventLogEntryType EntryType { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public int EventID { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public int Index { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public string Machineame { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public string Message { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public string[] ReplacementStrings { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public string Source { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public DateTime TimeGenerated { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public DateTime TimeWritten { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public string UserName { -// get {throw new NotImplementedException ();} -// } -// -// [MonoTODO] -// public bool Equals(EventLogEntry otherEntry) -// { -// throw new NotImplementedException (); -// } -// + [MonoTODO] + [MonitoringDescription ("The category of this event entry.")] + public string Category { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("An ID for the category of this event entry.")] + public short CategoryNumber { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("Binary data associated with this event entry.")] + public byte[] Data { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("The type of this event entry.")] + public EventLogEntryType EntryType { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("An ID number for this event entry.")] + public int EventID { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("Sequence numer of this event entry.")] + public int Index { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("The Computer on which this event entry occured.")] + public string MachineName { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + #if (NET_1_0) + [Editor ("System.ComponentModel.Design.BinaryEditor, System.Design, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + #endif + #if (NET_1_1) + [Editor ("System.ComponentModel.Design.BinaryEditor, System.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + #endif + [MonitoringDescription ("The message of this event entry.")] + public string Message { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("Application strings for this event entry.")] + public string[] ReplacementStrings { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("The source application of this event entry.")] + public string Source { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("Generation time of this event entry.")] + public DateTime TimeGenerated { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("The time at which this event entry was written to the logfile.")] + public DateTime TimeWritten { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + [MonitoringDescription ("The name of a user associated with this event entry.")] + public string UserName { + get {throw new NotImplementedException ();} + } + + [MonoTODO] + public bool Equals(EventLogEntry otherEntry) + { + throw new NotImplementedException (); + } + [MonoTODO] void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) diff --git a/mcs/class/System/System.Diagnostics/EventLogInstaller.cs b/mcs/class/System/System.Diagnostics/EventLogInstaller.cs index c49935cb714..cf04ec3d7a4 100644 --- a/mcs/class/System/System.Diagnostics/EventLogInstaller.cs +++ b/mcs/class/System/System.Diagnostics/EventLogInstaller.cs @@ -15,7 +15,7 @@ using System.Diagnostics; namespace System.Diagnostics { [MonoTODO] - public class EventLogInstaller + internal class EventLogInstaller // : ComponentInstaller { // [MonoTODO] diff --git a/mcs/class/System/System.Diagnostics/InstanceDataCollectionCollection.cs b/mcs/class/System/System.Diagnostics/InstanceDataCollectionCollection.cs index 6accd956f19..a54fb21ae96 100644 --- a/mcs/class/System/System.Diagnostics/InstanceDataCollectionCollection.cs +++ b/mcs/class/System/System.Diagnostics/InstanceDataCollectionCollection.cs @@ -49,7 +49,7 @@ namespace System.Diagnostics { return Dictionary.Contains (counterName); } - public void CopyTo (InstanceData[] counters, int index) + public void CopyTo (InstanceDataCollection[] counters, int index) { Dictionary.CopyTo (counters, index); } |