1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-10 05:13:17 +00:00

settings adjustments to allow sharing with service

This commit is contained in:
Kyle Spearrin
2017-05-16 16:28:11 -04:00
parent 7f332986de
commit fef92f6245
5 changed files with 21 additions and 16 deletions

View File

@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.ServiceProcess;
using System.Text;
@@ -21,21 +22,20 @@ namespace Service
public Service()
{
Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
ServiceName = "bitwarden Directory Connector";
_components = new Container();
_eventLog = new EventLog();
_eventLog.Source = ServiceName;
_eventLog.Log = "bitwarden";
_eventLog.Log = "Application";
var eventLogSupprot = _eventLog as ISupportInitialize;
eventLogSupprot.BeginInit();
if(!EventLog.SourceExists(_eventLog.Source))
{
EventLog.CreateEventSource(ServiceName, _eventLog.Log);
EventLog.CreateEventSource(_eventLog.Source, _eventLog.Log);
}
eventLogSupprot.EndInit();
}
protected override void Dispose(bool disposing)