public void OnSetOption(Option option)
 {
     if (option.Name.Equals("Port"))
     {
         int.TryParse(option.Value, out servicePort);
     }
 }
 public static void SetOption(this MigGateway gateway, string option, string value)
 {
     MigService.Log.Debug("{0}: {1}={2}", gateway.GetName(), option, value);
     var opt = gateway.GetOption(option);
     if (opt == null)
     {
         opt = new Option(option);
         gateway.Options.Add(opt);
     }
     opt.Value = value;
     gateway.OnSetOption(opt);
 }
 public static void SetOption(this MigInterface iface, string option, string value)
 {
     MigService.Log.Trace("{0}: {1}={2}", iface.GetDomain(), option, value);
     var opt = iface.GetOption(option);
     if (opt == null)
     {
         opt = new Option(option);
         iface.Options.Add(opt);
     }
     opt.Value = value;
     iface.OnSetOption(opt);
 }
 public void OnSetOption(Option option)
 {
     if (IsEnabled)
         Connect();
 }
 public void OnSetOption(Option option)
 {
     switch (option.Name)
     {
     case "BaseUrl":
         baseUrl = option.Value.Trim('/') + "/";
         break;
     case "HomePath":
         homePath = option.Value;
         break;
     case "Host":
         serviceHost = option.Value;
         break;
     case "Port":
         servicePort = option.Value;
         break;
     case "Password":
         servicePassword = option.Value;
         break;
     case "EnableFileCaching":
         ClearWebCache();
         bool.TryParse(option.Value, out enableFileCache);
         break;
     default:
         if (option.Name.StartsWith("HttpCacheIgnore."))
             HttpCacheIgnoreAdd(option.Value);
         else if (option.Name.StartsWith("UrlAlias."))
             UrlAliasAdd(option.Value);
         break;
     }
 }
Beispiel #6
0
 public void OnSetOption(Option option)
 {
     // TODO: check if this is working
     if (IsEnabled)
         Connect();
 }
Beispiel #7
0
 public OptionChangedEventArgs(Option option)
 {
     Option = option;
 }