Ejemplo n.º 1
0
        public object GetOptionValue(IOption option)
        {
            object value;

            if (mOptionValues.TryGetValue(option.Name, out value))
            {
                return(value);
            }
            return(mBaseOptionsProvider.GetOptionValue(option));
        }
 /// <summary>
 /// Applies the given options.
 /// </summary>
 /// <param name="options">Options, which should be applie.</param>
 public void ApplyOptions(IOptionsProvider options)
 {
     if (options == null)
     {
         return;
     }
     foreach (var option in Options)
     {
         try
         {
             var optionValue = options.GetOptionValue(option.Name);
             if (optionValue != null)
             {
                 SetOptionValue(option, optionValue);
             }
         }
         catch
         {
         }
     }
 }