Пример #1
0
        private IValuable <G> Add(ICollectionValue <G> collectionValue, IValueProvider <G> valueProvider)
        {
            IValuable <G> newValuable = null;

            switch (collectionValue)
            {
            case DefaultCollectionValue <G> listValue when !listValue.IsMap:
                newValuable = valueProvider.GetCollection(new[] { new ValuePointer <G> {
                                                                      Value = this
                                                                  } }.Concat(collectionValue.GetEntries().Select(entry => entry.Value)), null);
                break;

            default:
                throw new EngineRuntimeException("Invalid values for addition");
            }
            return(newValuable);
        }