Fix.
This commit is contained in:
@@ -492,18 +492,28 @@ namespace Tor.Config
|
||||
internal void SetValueDirect(string name, string value)
|
||||
{
|
||||
if (name == null)
|
||||
throw new ArgumentNullException("name");
|
||||
|
||||
{
|
||||
return;
|
||||
// throw new ArgumentNullException("name");
|
||||
}
|
||||
ConfigurationNames association = ReflectionHelper.GetEnumerator<ConfigurationNames, ConfigurationAssocAttribute>(attr => attr.Name.Equals(name, StringComparison.CurrentCultureIgnoreCase));
|
||||
ConfigurationAssocAttribute attribute = ReflectionHelper.GetAttribute<ConfigurationNames, ConfigurationAssocAttribute>(association);
|
||||
|
||||
if (attribute.Name.Equals(name, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
values[association] = ReflectionHelper.Convert(value, attribute.Type);
|
||||
try{values[association] = ReflectionHelper.Convert(value, attribute.Type);}
|
||||
catch(Exception exception)
|
||||
{
|
||||
try{values[association] = ReflectionHelper.Convert(value, typeof(String));}
|
||||
catch(Exception innerException)
|
||||
{
|
||||
Console.WriteLine(innerException);
|
||||
}
|
||||
}
|
||||
|
||||
if (PropertyChanged != null)
|
||||
PropertyChanged(client, new PropertyChangedEventArgs(attribute.Name));
|
||||
if (PropertyChanged != null)PropertyChanged(client, new PropertyChangedEventArgs(attribute.Name));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user