Exemple #1
0
        internal void SetValue(HoconValue value)
        {
            if (value == null)
            {
                return;
            }

            if (_internalValues.Any(v => ReferenceEquals(v, value)))
            {
                return;
            }

            if (value.Type != HoconType.Object)
            {
                foreach (var item in _internalValues)
                {
                    var subs         = item.GetSubstitutions();
                    var preservedSub = value.GetSubstitutions();
                    foreach (var sub in subs.Except(preservedSub))
                    {
                        sub.Removed = true;
                    }
                }
            }

            _internalValues.Add(value);
        }