public ChatInterface() : base("ChatInterface")
        {
            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine("[INFO] Hello from ChatInterface");
            Console.ResetColor();

            hub.Subscribe <IBotResult>(this.AddBotResult);
            hub.Subscribe <IUserResponse>(this.AddUserResponse);
            hub.Subscribe <ILog>(this.AddInfoLog);
            hub.Subscribe <IChatMessage>(this.ParseChatMessage);
            hub.Subscribe <IMachineMessage>(this.AddMachineMessage);
            hub.Subscribe <IUserFriendlyMachineMessage>(this.AddUserFriendlyMachineMessage);
            hub.Subscribe <IMachineImageMessage>(this.AddMachineImageMessage);
            hub.Subscribe <Abstractions.IMessageVariants.ICANSEE.IInformationMessage>(this.AddIcanseeInformationMessage);

            helper = new ChatInterfaceHelper(this);

            ChatApiController.hub                = hub;
            MachineMessageApiController.hub      = hub;
            MachineImageMessageApiController.hub = hub;

            string host = System.Configuration.ConfigurationSettings.AppSettings["ChatInterfaceHost"];
            string port = System.Configuration.ConfigurationSettings.AppSettings["ChatInterfacePort"];

            utility.GenerateIndexHtmlFromTemplate(host, port);
        }
        public override void Dispose()
        {
            ChatInterfaceUtility utility = null;

            hub.Unsubscribe <IBotResult>(this.AddBotResult);
            hub.Unsubscribe <IUserResponse>(this.AddUserResponse);
            hub.Unsubscribe <ILog>(this.AddInfoLog);
            hub.Unsubscribe <IChatMessage>(this.ParseChatMessage);
            hub.Unsubscribe <IMachineMessage>(this.AddMachineMessage);
            hub.Unsubscribe <IUserFriendlyMachineMessage>(this.AddUserFriendlyMachineMessage);
            hub.Unsubscribe <IMachineImageMessage>(this.AddMachineImageMessage);
            hub.Unsubscribe <Abstractions.IMessageVariants.ICANSEE.IInformationMessage>(this.AddIcanseeInformationMessage);

            helper.Dispose();
            helper = null;

            ChatApiController.hub                = null;
            MachineMessageApiController.hub      = null;
            MachineImageMessageApiController.hub = null;

            string host = null;
            string port = null;
        }