/// <summary> /// 设定配置的值 /// </summary> /// <param name="name">配置名</param> /// <param name="value">配置的值</param> public void Set(string name, object value) { Guard.Requires <AssertException>(locator != null); Guard.Requires <AssertException>(converters != null); Guard.Requires <ArgumentNullException>(name != null); locator.Set(name, converters.Convert <string>(value)); List <Action <object> > watch; if (watches.TryGetValue(name, out watch)) { foreach (var callback in watch) { callback.Invoke(value); } } }
IConversionExpressionWithValue ConvertSingleExpression(IConversionExpression expression) { return(mConverter.Convert(expression)); }