Пример #1
0
        public ECCentralMsg GetECCentralConfig()
        {
            ECCentralMsg msg = new ECCentralMsg();

            msg.ServiceURL   = CPConfig.ECCentral.ServiceURL;
            msg.ConfigPrefix = CPConfig.ECCentral.ConfigPrefix;
            return(msg);
        }
Пример #2
0
        void serviceClient_GetECCentralConfigCompleted(object sender, GetECCentralConfigCompletedEventArgs e)
        {
            ECCentralMsg msg = e.Result;

            if (CPApplication.Current.CommonData == null)
            {
                CPApplication.Current.CommonData = new Dictionary <string, object>();
            }
            CPApplication.Current.CommonData.Add("ECCentralServiceURL", msg.ServiceURL);
            CPApplication.Current.CommonData.Add("ECCentralConfigPrefix", (msg.ConfigPrefix == null || msg.ConfigPrefix.Trim().Length <= 0 ? string.Empty : msg.ConfigPrefix.Trim()));
            Action callback = e.UserState as Action;

            if (callback != null)
            {
                callback();
            }
        }