+2002-06-09 Jonathan Pryor <jonpryor@vt.edu>
+ * EntryWrittenEventArgs.cs: Implemented
+ * EntryWrittenEventHandler.cs: Implemented
+ * EventLog.cs: Stubbed out
+ * EventLogEntry.cs: Stubbed out
+ * EventLogEntryCOllection.cs: Implemented.
+ * EventLogEntryType.cs: Implemented
+ * EventLogInstaller.cs: Stubbed out
+ * EventLogPermission.cs: Stubbed out
+ * EventLogPermissionAccess.cs: Implemented
+ * EventLogPermissionAttribute.cs: Stubbed out
+ * EventLogPermissionEntry.cs: Stubbed out
+ * EventLogPermissionEntryCollection.cs: Stubbed out
+ * EventLogTraceListener.cs: Stubbed out
+
2002-05-29 Jonathan Pryor <jonpryor@vt.edu>
* DefaultTraceListener.cs: Implemented MONO_TRACE support
--- /dev/null
+//
+// System.Diagnostics.EntryWrittenEventArgs.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace System.Diagnostics {
+
+ public class EntryWrittenEventArgs : EventArgs {
+
+ private EventLogEntry entry;
+
+ public EntryWrittenEventArgs () : this (null)
+ {
+ }
+
+ public EntryWrittenEventArgs (EventLogEntry entry)
+ {
+ this.entry = entry;
+ }
+
+ public EventLogEntry Entry {
+ get {return entry;}
+ }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EntryWrittenEventHandler.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+
+namespace System.Diagnostics {
+
+ public delegate void EntryWrittenEventHandler(
+ object sender,
+ EntryWrittenEventArgs e);
+
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLog.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+using System.ComponentModel;
+
+namespace System.Diagnostics {
+
+ [MonoTODO("This class is just stubbed out")]
+ public class EventLog : Component, ISupportInitialize {
+
+ private string source;
+ private string logName;
+ private string machineName;
+
+ public EventLog() : this ("")
+ {
+ }
+
+ public EventLog(string logName) : this (logName, "")
+ {
+ }
+
+ public EventLog(string logName, string machineName)
+ : this (logName, machineName, "")
+ {
+ }
+
+ public EventLog(string logName, string machineName,
+ string source)
+ {
+ this.source = source;
+ this.machineName = machineName;
+ 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]
+ 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 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 event EntryWrittenEventHandler EntryWritten;
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogEntry.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.ComponentModel;
+using System.Diagnostics;
+using System.Runtime.Serialization;
+
+namespace System.Diagnostics {
+
+ [Serializable]
+ [MonoTODO("Just stubbed out")]
+ public sealed class EventLogEntry : Component, ISerializable {
+
+ [MonoTODO]
+ internal EventLogEntry ()
+ {
+ }
+
+// [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]
+ void ISerializable.GetObjectData(SerializationInfo info,
+ StreamingContext context)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogEntryCollection.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002 Jonathan Pryor
+//
+
+
+using System;
+using System.Collections;
+using System.Diagnostics;
+
+namespace System.Diagnostics {
+
+ public class EventLogEntryCollection : ICollection, IEnumerable {
+
+ private ArrayList eventLogs = new ArrayList ();
+
+ internal EventLogEntryCollection()
+ {
+ }
+
+ public int Count {
+ get {return eventLogs.Count;}
+ }
+
+ public virtual EventLogEntry this [int index] {
+ get {return (EventLogEntry) eventLogs[index];}
+ }
+
+ bool ICollection.IsSynchronized {
+ get {return eventLogs.IsSynchronized;}
+ }
+
+ object ICollection.SyncRoot {
+ get {return eventLogs.SyncRoot;}
+ }
+
+ public void CopyTo (EventLogEntry[] eventLogs, int index)
+ {
+ eventLogs.CopyTo (eventLogs, index);
+ }
+
+ public IEnumerator GetEnumerator ()
+ {
+ return eventLogs.GetEnumerator ();
+ }
+
+ void ICollection.CopyTo (Array array, int index)
+ {
+ eventLogs.CopyTo (array, index);
+ }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogEntryType.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+
+namespace System.Diagnostics {
+
+ [Serializable]
+ public enum EventLogEntryType {
+ Error = 0x01,
+ Warning = 0x02,
+ Information = 0x04,
+ SuccessAudit = 0x08,
+ FailureAudit = 0x10
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogInstaller.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+
+// using System.Configuration.Install;
+
+namespace System.Diagnostics {
+
+ [MonoTODO]
+ public class EventLogInstaller
+// : ComponentInstaller
+ {
+// [MonoTODO]
+// public EventLogInstaller()
+// {
+// }
+//
+// [MonoTODO]
+// public string Log {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+// [MonoTODO]
+// public string Source {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+// [MonoTODO]
+// public UninstallAction UninstallAction {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+// // may throw ArgumentException if
+// // - component isn't an EventlOg
+// // - The Log or Source properties are null or ""
+// [MonoTODO]
+// public override void CopyFromComponenet(IComponent component)
+// {
+// }
+//
+// // may throw PlatformNotSupportedException if not >= NT4
+// [MonoTODO]
+// public override void Install(IDictionary stateSaver)
+// {
+// }
+//
+// [MonoTODO]
+// public override bool IsEquivalentInstaller(
+// ComponentInstaller otherInstaller)
+// {
+// }
+//
+// [MonoTODO]
+// public override void Rollback(IDictionary savedState)
+// {
+// }
+//
+// [MonoTODO]
+// public override void Uninstall(IDictionary savedState)
+// {
+// }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogPermission.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002 Jonathan Pryor
+//
+
+using System;
+using System.Diagnostics;
+using System.Security.Permissions;
+
+namespace System.Diagnostics {
+
+ [Serializable]
+ [MonoTODO("Just Stubbed Out")]
+ public class EventLogPermission
+// : ResourcePermissionBase
+ {
+// [MonoTODO]
+// public EventLogPermission()
+// {
+// }
+//
+// [MonoTODO]
+// public EventLogPermission(
+// EventLogPermissionEntry[] permissionAccessEntries)
+// {
+// }
+//
+// [MonoTODO]
+// public EventLogPermission(PermissionState state)
+// {
+// }
+//
+// [MonoTODO]
+// public EventLogPermission(
+// EventLogPermissionAccess permissionAccess,
+// string machineName)
+// {
+// }
+//
+// [MonoTODO]
+// public EventLogPermissionEntryCollection PermissionEntries {
+// get {throw new NotImplementedException();}
+// }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogPermissionAccess.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002 Jonathan Pryor
+//
+
+using System;
+using System.Diagnostics;
+
+namespace System.Diagnostics {
+
+ [Flags, Serializable]
+ public enum EventLogPermissionAccess {
+ None=0,
+ Browse=0x2,
+ Instrument=0x6,
+ Audit=0xA,
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogPermissionAttribute.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+using System.Security;
+using System.Security.Permissions;
+
+namespace System.Diagnostics {
+
+ [AttributeUsage(
+ AttributeTargets.Assembly | AttributeTargets.Class |
+ AttributeTargets.Struct | AttributeTargets.Constructor |
+ AttributeTargets.Method | AttributeTargets.Event)]
+ [Serializable]
+ [MonoTODO("Just Stubbed Out")]
+ public class EventLogPermissionAttribute : CodeAccessSecurityAttribute {
+
+ public EventLogPermissionAttribute(SecurityAction action)
+ : base(action)
+ {
+ }
+
+// // May throw ArgumentException if computer name is invalid
+// public string MachineName {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+// public EventLogPermissionAccess PermissionAccess {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+ [MonoTODO]
+ public override IPermission CreatePermission()
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogPermissionEntry.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002
+//
+
+using System;
+using System.Diagnostics;
+
+namespace System.Diagnostics {
+
+ [Serializable]
+ [MonoTODO("Just Stubbed Out")]
+ public class EventLogPermissionEntry {
+
+// [MonoTODO]
+// public EventLogPermissionEntry(
+// EventLogPermissionAccess permissionAccess,
+// string machineName)
+// {
+// }
+//
+// [MonoTODO]
+// public string MachineName {
+// get {throw new NotImplementedException();}
+// }
+//
+// [MonoTODO]
+// public EventLogPermissionAccess PermissionAccess {
+// get {throw new NotImplementedException();}
+// }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogEntryCollection.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002 Jonathan Pryor
+//
+
+
+using System;
+using System.Collections;
+using System.Diagnostics;
+
+namespace System.Diagnostics {
+
+ [MonoTODO]
+ public class EventLogPermissionEntryCollection : CollectionBase {
+
+ [MonoTODO]
+ internal EventLogPermissionEntryCollection()
+ {
+ }
+
+// [MonoTODO]
+// public virtual EventLogEntry this [int index] {
+// get {throw new NotImplementedException();}
+// }
+//
+// [MonoTODO]
+// public int Add(EventLogPermissionEntry value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public void AddRange(EventLogPermissionEntry[] value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public void AddRange(EventLogPermissionEntryCollection value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public bool Contains(EventLogPermissionEntry value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public void CopyTo(EventLogPermissionEntry[] array, int index)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public int IndexOf(EventLogPermissionEntry value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public void Insert(int index, EventLogPermissionEntry value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// protected override void OnClear()
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// protected override void OnInsert(int index, object value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// protected override void OnRemove(int index, object value)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// protected override void OnSet(int index, object oldValue,
+// object newValue)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public void Remove(EventLogPermissionEntry value)
+// {
+// throw new NotImplementedException();
+// }
+ }
+}
+
--- /dev/null
+//
+// System.Diagnostics.EventLogTraceListener.cs
+//
+// Authors:
+// Jonathan Pryor (jonpryor@vt.edu)
+//
+// (C) 2002 Jonathan Pryor
+//
+
+
+using System;
+using System.Collections;
+using System.Diagnostics;
+
+namespace System.Diagnostics {
+
+ [MonoTODO]
+ public class EventLogTraceListener : TraceListener {
+
+// [MonoTODO]
+// public EventLogTraceListener()
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public EventLogTraceListener(EventLog eventLog)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public EventLogTraceListener(string source)
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// public EventLog EventLog {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+// [MonoTODO]
+// public override string Name {
+// get {throw new NotImplementedException();}
+// set {throw new NotImplementedException();}
+// }
+//
+// [MonoTODO]
+// public override void Close()
+// {
+// throw new NotImplementedException();
+// }
+//
+// [MonoTODO]
+// protected override void Dispose(bool disposing)
+// {
+// throw new NotImplementedException();
+// }
+//
+ [MonoTODO]
+ public override void Write(string message)
+ {
+ throw new NotImplementedException();
+ }
+
+ [MonoTODO]
+ public override void WriteLine(string message)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
+