public void Init() { handlers = new SortedList <int, ISyncHandler>(); var types = TypeFinder.FindClassesOfType <ISyncHandler>(); LogHelper.Info <uSyncBackOfficeContext>("Loading up Sync Handlers : {0}", () => types.Count()); foreach (var t in types) { var typeInstance = Activator.CreateInstance(t) as ISyncHandler; if (typeInstance != null) { LogHelper.Debug <uSyncBackOfficeContext>("Adding Instance: {0}", () => typeInstance.Name); handlers.Add(typeInstance.Priority, typeInstance); } } uSyncCoreContext.Instance.Init(); _config = new uSyncBackOfficeConfig(); Tracker = new Helpers.ActionTracker(_config.Settings.MappedFolder()); }
public void Init() { handlers = new SortedList<int, ISyncHandler>(); var types = TypeFinder.FindClassesOfType<ISyncHandler>(); LogHelper.Info<uSyncBackOfficeContext>("Loading up Sync Handlers : {0}", () => types.Count()); foreach (var t in types) { var typeInstance = Activator.CreateInstance(t) as ISyncHandler; if (typeInstance != null) { LogHelper.Debug<uSyncBackOfficeContext>("Adding Instance: {0}", () => typeInstance.Name); handlers.Add(typeInstance.Priority, typeInstance); } } uSyncCoreContext.Instance.Init(); _config = new uSyncBackOfficeConfig(); Tracker = new Helpers.ActionTracker(_config.Settings.MappedFolder()); }