1 // System.Diagnostics.EventLogInstaller.cs
4 // Gert Driesen (drieseng@users.sourceforge.net)
10 // Permission is hereby granted, free of charge, to any person obtaining
11 // a copy of this software and associated documentation files (the
12 // "Software"), to deal in the Software without restriction, including
13 // without limitation the rights to use, copy, modify, merge, publish,
14 // distribute, sublicense, and/or sell copies of the Software, and to
15 // permit persons to whom the Software is furnished to do so, subject to
16 // the following conditions:
18 // The above copyright notice and this permission notice shall be
19 // included in all copies or substantial portions of the Software.
21 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
25 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
26 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
27 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 using System.Collections;
31 using System.ComponentModel;
32 using System.Configuration.Install;
33 using System.Runtime.InteropServices;
35 namespace System.Diagnostics
37 public class EventLogInstaller : ComponentInstaller
39 public EventLogInstaller ()
44 public override void CopyFromComponent (IComponent component)
46 throw new NotImplementedException ();
50 public override void Install (IDictionary stateSaver)
52 throw new NotImplementedException ();
56 public override bool IsEquivalentInstaller (ComponentInstaller otherInstaller)
58 throw new NotImplementedException ();
62 public override void Rollback (IDictionary savedState)
64 throw new NotImplementedException ();
68 public override void Uninstall (IDictionary savedState)
70 throw new NotImplementedException ();
73 [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
76 if (_log == null && _source != null)
77 _log = EventLog.LogNameFromSourceName (_source, ".");
86 [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
87 public string Source {
96 [DefaultValue (UninstallAction.Remove)]
97 public UninstallAction UninstallAction {
99 return _uninstallAction;
102 if (!Enum.IsDefined(typeof(UninstallAction), value))
103 // LAMESPEC, the docs do not mention this, but
104 // this exception is indeed thrown for invalid
106 throw new InvalidEnumArgumentException("value",
107 (int) value, typeof(UninstallAction));
109 _uninstallAction = value;
114 private string _source;
115 private UninstallAction _uninstallAction = UninstallAction.Remove;