public override void Initialize() { CurrentSession.UpdateStatusRequestReceived += new EventHandler<StatusUpdateEventArgs>(Session_UpdateStatusRequestReceived); CurrentSession.PreSendMessageTimelineStatus += new EventHandler<TimelineStatusEventArgs>(Session_PreSendMessageTimelineStatus); CurrentSession.ConfigChanged += new EventHandler<EventArgs>(Session_ConfigChanged); CurrentSession.AddInsLoadCompleted += (sender, e) => { CurrentSession.AddInManager.GetAddIn<ConsoleAddIn>().RegisterContext<TypableMapContext>(); }; TypableMapFactory = new TypableMapStatusOnDemandRepositoryFactory(CurrentSession); if (CurrentSession.Config.EnableTypableMap) UpdateProcessor(); }
public override void Initialize() { CurrentSession.UpdateStatusRequestReceived += new EventHandler <StatusUpdateEventArgs>(Session_UpdateStatusRequestReceived); CurrentSession.PreSendMessageTimelineStatus += new EventHandler <TimelineStatusEventArgs>(Session_PreSendMessageTimelineStatus); CurrentSession.ConfigChanged += new EventHandler <EventArgs>(Session_ConfigChanged); CurrentSession.AddInsLoadCompleted += (sender, e) => { CurrentSession.AddInManager.GetAddIn <ConsoleAddIn>().RegisterContext <TypableMapContext>(); }; TypableMapFactory = new TypableMapStatusOnDemandRepositoryFactory(CurrentSession); if (CurrentSession.Config.EnableTypableMap) { UpdateProcessor(); } }
public TypableMapCommandProcessor(ITypableMapStatusRepositoryFactory typableMapFactory, Session session, Int32 typableMapKeySize) { Session = session; _typableMapKeySize = typableMapKeySize; _commands = new Dictionary<string, ITypableMapCommand>(StringComparer.InvariantCultureIgnoreCase); _typableMapFactory = typableMapFactory; TypableMap = typableMapFactory.Create(typableMapKeySize); foreach (var t in typeof(TypableMapCommandProcessor).GetNestedTypes()) { if (typeof(ITypableMapCommand).IsAssignableFrom(t) && typeof(GenericCommand) != t && t.IsClass) { var cmd = Activator.CreateInstance(t) as ITypableMapCommand; AddCommand(cmd); } } UpdateRegex(); }
public TypableMapCommandProcessor(ITypableMapStatusRepositoryFactory typableMapFactory, Session session, Int32 typableMapKeySize) { Session = session; _typableMapKeySize = typableMapKeySize; _commands = new Dictionary <string, ITypableMapCommand>(StringComparer.InvariantCultureIgnoreCase); _typableMapFactory = typableMapFactory; TypableMap = typableMapFactory.Create(typableMapKeySize); foreach (var t in typeof(TypableMapCommandProcessor).GetNestedTypes()) { if (typeof(ITypableMapCommand).IsAssignableFrom(t) && typeof(GenericCommand) != t && t.IsClass) { var cmd = Activator.CreateInstance(t) as ITypableMapCommand; AddCommand(cmd); } } UpdateRegex(); }