|
|
@ -127,7 +127,7 @@ namespace CSharpBinding.FormattingStrategy |
|
|
|
if ((e.PropertyName == "Parent") || (e.PropertyName == null)) { |
|
|
|
if ((e.PropertyName == "Parent") || (e.PropertyName == null)) { |
|
|
|
// All properties might have changed -> update everything
|
|
|
|
// All properties might have changed -> update everything
|
|
|
|
cachedOptions = CreateCachedOptions(); |
|
|
|
cachedOptions = CreateCachedOptions(); |
|
|
|
OnPropertyChanged(e.PropertyName); |
|
|
|
// OnPropertyChanged(e.PropertyName);
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// Some other property has changed, check if we have our own value for it
|
|
|
|
// Some other property has changed, check if we have our own value for it
|
|
|
|
if (!activeOptions.Contains(e.PropertyName)) { |
|
|
|
if (!activeOptions.Contains(e.PropertyName)) { |
|
|
@ -136,7 +136,7 @@ namespace CSharpBinding.FormattingStrategy |
|
|
|
if (propertyInfo != null) { |
|
|
|
if (propertyInfo != null) { |
|
|
|
var val = GetEffectiveOption(e.PropertyName); |
|
|
|
var val = GetEffectiveOption(e.PropertyName); |
|
|
|
propertyInfo.SetValue(cachedOptions, val); |
|
|
|
propertyInfo.SetValue(cachedOptions, val); |
|
|
|
OnPropertyChanged(e.PropertyName); |
|
|
|
// OnPropertyChanged(e.PropertyName);
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -265,14 +265,16 @@ namespace CSharpBinding.FormattingStrategy |
|
|
|
if (parentProperties == null) |
|
|
|
if (parentProperties == null) |
|
|
|
throw new ArgumentNullException("parentProperties"); |
|
|
|
throw new ArgumentNullException("parentProperties"); |
|
|
|
|
|
|
|
|
|
|
|
Properties formatProperties = parentProperties.NestedProperties("CSharpFormatting"); |
|
|
|
if (parentProperties.Contains("CSharpFormatting")) { |
|
|
|
if (formatProperties != null) { |
|
|
|
Properties formatProperties = parentProperties.NestedProperties("CSharpFormatting"); |
|
|
|
foreach (var key in formatProperties.Keys) { |
|
|
|
if (formatProperties != null) { |
|
|
|
try { |
|
|
|
foreach (var key in formatProperties.Keys) { |
|
|
|
object val = formatProperties.Get(key, (object) null); |
|
|
|
try { |
|
|
|
SetOption(key, val); |
|
|
|
object val = formatProperties.Get(key, (object)null); |
|
|
|
} catch (Exception) { |
|
|
|
SetOption(key, val); |
|
|
|
// Silently ignore loading error, then this property will be "as parent" automatically
|
|
|
|
} catch (Exception) { |
|
|
|
|
|
|
|
// Silently ignore loading error, then this property will be "as parent" automatically
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|