private void InsertFallbackValue(HoconValue value) { HoconValue duplicateValue = null; foreach (var fallbackValue in _fallbacks) { if (fallbackValue == value) { duplicateValue = fallbackValue; break; } } if (duplicateValue != null) { _fallbacks.Remove(duplicateValue); } _fallbacks.Add((HoconValue)value.Clone(null)); }
private void InsertFallbackValue(HoconValue value) { HoconValue duplicateValue = null; foreach (var fallbackValue in _fallbacks) { if (fallbackValue == value) { duplicateValue = fallbackValue; break; } } if (duplicateValue == null) { var clone = (HoconValue)value.Clone(null); _fallbacks.Add(clone); Root.GetObject().FallbackMerge(clone.GetObject()); } }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="Config" /> class. /// </summary> protected Config(HoconValue value) { Value = (HoconValue)value.Clone(null); }