Пример #1
0
        public HAServiceSettings LoadServiceSettings()
        {
            HAGetConfigArgs args = new HAGetConfigArgs();
            args.ServiceName = _serviceName;
            args.ComputerName = _computerName;

            return _proxy.Invoke<HAGetConfigArgs, HAServiceSettings>("LoadServiceSettings", args);
        }
Пример #2
0
        public IICConfigTableBuffer LoadConfigTable(string tableName)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();
            args.ServiceName = _serviceName;
            args.ComputerName = _computerName;
            args.Path = tableName;

            return _proxy.Invoke<HAGetConfigArgs, IICConfigTableBuffer>("LoadConfigTable", args);
        }
Пример #3
0
        public IICConfigFieldBuffer LoadConfigField(string key)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();
            args.ServiceName = _serviceName;
            args.ComputerName = _computerName;
            args.Path = key;

            return _proxy.Invoke<HAGetConfigArgs, IICConfigFieldBuffer>("LoadConfigField", args);
        }
Пример #4
0
        public IList<IICConfigItemBuffer> LoadConfigSection(string path)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();
            args.ServiceName = _serviceName;
            args.ComputerName = _computerName;
            args.Path = path;

            return _proxy.Invoke<HAGetConfigArgs, List<IICConfigItemBuffer>>("LoadConfigSection", args);
        }
Пример #5
0
        public HAServiceSettings LoadServiceSettings()
        {
            HAGetConfigArgs args = new HAGetConfigArgs();

            args.ServiceName  = _serviceName;
            args.ComputerName = _computerName;

            return(_proxy.Invoke <HAGetConfigArgs, HAServiceSettings>("LoadServiceSettings", args));
        }
Пример #6
0
        public IICConfigTableBuffer LoadConfigTable(string tableName)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();

            args.ServiceName  = _serviceName;
            args.ComputerName = _computerName;
            args.Path         = tableName;

            return(_proxy.Invoke <HAGetConfigArgs, IICConfigTableBuffer>("LoadConfigTable", args));
        }
Пример #7
0
        public IList <IICConfigItemBuffer> LoadConfigSection(string path)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();

            args.ServiceName  = _serviceName;
            args.ComputerName = _computerName;
            args.Path         = path;

            return(_proxy.Invoke <HAGetConfigArgs, List <IICConfigItemBuffer> >("LoadConfigSection", args));
        }
Пример #8
0
        public IICConfigFieldBuffer LoadConfigField(string key)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();

            args.ServiceName  = _serviceName;
            args.ComputerName = _computerName;
            args.Path         = key;

            return(_proxy.Invoke <HAGetConfigArgs, IICConfigFieldBuffer>("LoadConfigField", args));
        }
Пример #9
0
        public string LoadConfigText(string path)
        {
            HAGetConfigArgs args = new HAGetConfigArgs();

            args.ServiceName  = _serviceName;
            args.ComputerName = _computerName;
            args.Path         = path;
            args.Key          = " ";

            var r = _proxy.Invoke <HAGetConfigArgs, RpcClass <string> >("LoadConfigText", args);

            return(r.Value);
        }
Пример #10
0
        public static void InitServiceHa(string serviceName, string computerName, string centerUrl)
        {
            if (_current != null && _current.ServiceName != NULL)
                return;

            lock (_syncRoot) {
                _current = new ServiceSettingsConfigProxy(serviceName, computerName);

                RpcHttpClientChannel channel = new RpcHttpClientChannel();
                RpcProxyFactory.RegisterClientChannel(channel);

                HAGetConfigArgs args = new HAGetConfigArgs();
                args.ServiceName = serviceName;
                args.ComputerName = computerName;

                var proxy = RpcProxyFactory.GetProxy<IHACenterConfigService>(centerUrl);
                HAServiceSettings settings = proxy.Invoke<HAGetConfigArgs, HAServiceSettings>(
                    "LoadServiceSettings",
                    args);

                IICConfigurationManager.Loader = new HAConfigurationLoader(serviceName, computerName, centerUrl);

                _current.UpdateConfig(ServiceRunMode.HAService, settings);
                TracingManager.UpdateConfig();
            }
        }