public IntelliTwitterService() { InitializeComponent(); this.manager = new TwitterManager(serviceLog); bool sourceFound = false; try { sourceFound = EventLog.SourceExists("IntelliTwitterSource"); } catch (SecurityException) { sourceFound = false; } //Create an eventlog for the service if (!sourceFound) { System.Diagnostics.EventLog.CreateEventSource( "IntelliTwitterSource", "IntelliTwitterLog"); } //Set the names of the source and the logfile serviceLog.Source = "IntelliTwitterSource"; serviceLog.Log = "IntelliTwitterLog"; serviceLog.WriteEntry("Service initialized", EventLogEntryType.Information); }
public void InitializeTest() { var twitterManager = new TwitterManager(new System.Diagnostics.EventLog()); privateTwitterManager = new PrivateObject(twitterManager); }