Example #1
0
        public override void Initialize()
        {
            base.Initialize();
            crmListener = new HttpListener();
            string text = ConfigurationValueReader.ConfigurationReader().ReadAppSettings("GenericListener");

            if (string.IsNullOrEmpty(text))
            {
                text = "http://localhost:5000/";
            }
            crmListener.Prefixes.Add(text);
            crmListener.Start();
            crmRequestWorker = new Thread(RequestWorker);
            crmRequestWorker.IsBackground = true;
            crmRequestWorker.Start();
            PerfLogger.LogData("UII_HOSTED_APP_LOAD_" + GetHashCode(), new Dictionary <string, string>
            {
                {
                    "AppID",
                    base.ApplicationID.ToString()
                },
                {
                    "Name",
                    base.ApplicationName
                }
            });
        }