示例#1
0
 public void EnableInterface(string domain)
 {
     if (Interfaces.ContainsKey(domain))
     {
         MIGInterface migInterface = Interfaces[domain];
         migInterface.Options = configuration.GetInterface(domain).Options;
         migInterface.Connect();
     }
 }
示例#2
0
        public static void SetOption(this MIGInterface iface, string option, string value)
        {
            var opt = iface.GetOption(option);

            if (opt != null)
            {
                iface.Disconnect();
                opt.Value = value;
                iface.Connect();
            }
        }
示例#3
0
        public MIGInterface EnableInterface(string domain)
        {
            MIGInterface migInterface = null;

            if (Interfaces.ContainsKey(domain))
            {
                migInterface           = Interfaces[domain];
                migInterface.Options   = configuration.GetInterface(domain).Options;
                migInterface.IsEnabled = true;
                migInterface.Connect();
            }
            return(migInterface);
        }
示例#4
0
        public static void SetOption(this MIGInterface iface, string option, string value)
        {
            var opt = iface.GetOption(option);

            if (opt == null)
            {
                opt = new MIGServiceConfiguration.Interface.Option()
                {
                    Name = option
                };
                iface.Options.Add(opt);
            }
            iface.Disconnect();
            opt.Value = value;
            iface.Connect();
        }