public SystemCommandSystem(
     ICommunication communication,
     ApplicationManagement applicationManagement)
 {
     this.communication         = communication;
     this.applicationManagement = applicationManagement;
 }
Beispiel #2
0
        public BasicView(
            Config.IBotConfigContainer botConfigContainer,
            ICommunication communication,
            ApplicationManagement applicationManagement)
        {
            botConfig                  = botConfigContainer.BotConfig;
            this.communication         = communication;
            this.applicationManagement = applicationManagement;

            consoleChannel = Channel.CreateUnbounded <ConsoleKeyInfo>();

            LaunchListeners();

            communication.ReceivePendingNotificationHandlers += ReceivePendingNotification;
            communication.ReceiveEventHandlers  += ReceiveEventHandler;
            communication.ReceiveMessageLoggers += ReceiveMessageHandler;
            communication.SendMessageHandlers   += SendPublicChatHandler;
            communication.SendWhisperHandlers   += SendWhisperHandler;
            communication.DebugMessageHandlers  += DebugMessageHandler;
        }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["AuthenticaitonClient"] != null)
            {
                RestClient            authenticationClient = (RestClient)Session["AuthenticaitonClient"];
                ApplicationManagement appManagementClient  = new ApplicationManagement(authenticationClient);


                Dictionary <string, dynamic> dApps = appManagementClient.GetUPData();

                var appsList = dApps["Apps"];

                int iCount = 0;

                foreach (var app in appsList)
                {
                    string strDisplayName = app["DisplayName"];
                    string strAppKey      = app["AppKey"];
                    string strIcon        = app["Icon"];

                    AddUrls(strAppKey, strDisplayName, strIcon, iCount);

                    iCount++;
                }
            }
            else
            {
                Apps.Visible         = false;
                ErrorMessage.Visible = true;
                FailureText.Text     = "You are not logged in. Please click <a href=\"Login.aspx?redirect=Applications.aspx\">here.</a> to log in.";
            }
        }
        catch (Exception ex)
        {
            Apps.Visible         = false;
            ErrorMessage.Visible = true;
            FailureText.Text     = ex.InnerException.ToString();
        }
    }
Beispiel #4
0
        public BasicView(
            Config.BotConfiguration botConfig,
            ICommunication communication,
            ApplicationManagement applicationManagement)
        {
            this.botConfig             = botConfig;
            this.communication         = communication;
            this.applicationManagement = applicationManagement;

            consoleChannel = Channel.CreateUnbounded <ConsoleKeyInfo>();

            LaunchListeners();

            communication.ReceivePendingNotificationHandlers += ReceivePendingNotification;
            communication.ReceiveEventHandlers  += ReceiveEventHandler;
            communication.ReceiveMessageLoggers += ReceiveMessageHandler;
            communication.SendMessageHandlers   += SendPublicChatHandler;
            communication.SendWhisperHandlers   += SendWhisperHandler;
            communication.DebugMessageHandlers  += DebugMessageHandler;

            communication.SendDebugMessage("BasicView Connected.  Listening for Ctrl+Q to quit gracefully.\n");
        }
 public IActionResult Quit(
     [FromServices] ApplicationManagement applicationManagement)
 {
     applicationManagement.TriggerExit();
     return(Ok());
 }