Ejemplo n.º 1
0
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream,
                                                          ContextObject context,
                                                          ScopeData scopeData)
        {
            var service =
                scopeData.ParserOptions.Formatters.Services.GetService(typeof(IMorestachioLocalizationService)) as
                IMorestachioLocalizationService;

            if (service == null)
            {
                outputStream.Write("IMorestachioLocalizationService not registered");
                return(Enumerable.Empty <DocumentItemExecution>());
            }

            var translationOrNull = await GetTranslation(context, scopeData, service);

            outputStream.Write(translationOrNull?.ToString());
            return(Enumerable.Empty <DocumentItemExecution>());
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Reads all content from the Stream and returns it as a String
        /// </summary>
        /// <param name="source"></param>
        /// <param name="disposeOriginal"></param>
        /// <param name="encoding"></param>
        /// <returns></returns>
        public static string Stringify(this IByteCounterStream source, bool disposeOriginal, Encoding encoding)
        {
            if (source is ByteCounterStream bcs)
            {
                return(bcs.Stream.Stringify(disposeOriginal, encoding));
            }

            try
            {
                return(source.ToString());
            }
            finally
            {
                if (disposeOriginal)
                {
                    source.Dispose();
                }
            }
        }
Ejemplo n.º 3
0
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
        {
            //try to locate the value in the context, if it exists, append it.
            var contextObject = context != null ? (await MorestachioExpression.GetValue(context, scopeData)) : null;

            if (contextObject != null)
            {
                //await contextObject.EnsureValue();
                if (EscapeValue && !scopeData.ParserOptions.DisableContentEscaping)
                {
                    outputStream.Write(HtmlEncodeString(await contextObject.RenderToString(scopeData)));
                }
                else
                {
                    outputStream.Write(await contextObject.RenderToString(scopeData));
                }
            }

            return(Children.WithScope(contextObject));
        }
Ejemplo n.º 4
0
        /// <inheritdoc />
        public override async Task <IEnumerable <DocumentItemExecution> > Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
        {
            var index = 0;

            while (ContinueBuilding(outputStream, context))
            {
                var collectionContext = new ContextCollection(index++, false, context.Options, context.Key, context.Parent)
                {
                    Value = context.Value
                };

                //TODO get a way how to execute this on the caller
                await MorestachioDocument.ProcessItemsAndChildren(Children, outputStream, collectionContext, scopeData);

                if (!await(await MorestachioExpression.GetValue(collectionContext, scopeData)).Exists())
                {
                    break;
                }
            }
            return(new DocumentItemExecution[0]);
        }
        /// <inheritdoc />
        public override async Task <IEnumerable <DocumentItemExecution> > Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
        {
            //try to locate the value in the context, if it exists, append it.
            var contextObject = context != null ? (await context.GetContextForPath(Value, scopeData)) : null;

            if (contextObject?.Value != null)
            {
                await contextObject.EnsureValue();

                if (EscapeValue && !context.Options.DisableContentEscaping)
                {
                    ContentDocumentItem.WriteContent(outputStream, HtmlEncodeString(await contextObject.RenderToString()), contextObject);
                }
                else
                {
                    ContentDocumentItem.WriteContent(outputStream, await contextObject.RenderToString(), contextObject);
                }
            }

            return(Children.WithScope(contextObject));
        }
Ejemplo n.º 6
0
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream,
                                                          ContextObject context,
                                                          ScopeData scopeData)
        {
            var c = await MorestachioExpression.GetValue(context, scopeData);

            context = context.IsNaturalContext || context.Parent == null ? context : context.Parent;

            if (c.Exists() != Inverted)
            {
                return(GetIfContents()
                       .WithScope(context.IsNaturalContext || context.Parent == null ? context : context.Parent));
            }

            var elseBlocks = GetNestedElseConditions().ToArray();

            if (elseBlocks.Length > 0)
            {
                foreach (var documentItem in elseBlocks)
                {
                    var elseContext = await documentItem.MorestachioExpression.GetValue(context, scopeData);

                    if (elseContext.Exists() != Inverted)
                    {
                        return(documentItem.Children
                               .WithScope(context.IsNaturalContext || context.Parent == null ? context : context.Parent));
                    }
                }
            }

            var elseBlock = GetNestedElse();

            if (elseBlock != null)
            {
                return(new[] { elseBlock }
                       .WithScope(context.IsNaturalContext || context.Parent == null ? context : context.Parent));
            }

            return(Enumerable.Empty <DocumentItemExecution>());
        }
        /// <inheritdoc />
        public override async Task <IEnumerable <DocumentItemExecution> > Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
        {
            if (context == null)
            {
                return(new DocumentItemExecution[0]);
            }
            var c = await context.GetContextForPath(Value, scopeData);

            if (FormatString != null && FormatString.Any())
            {
                var argList = new List <KeyValuePair <string, object> >();

                foreach (var formatterArgument in FormatString)
                {
                    //if pre and suffixed by a $ its a reference to another field.
                    //walk the path in the $ and use the value in the formatter
                    var trimmedArg = formatterArgument.Argument?.Trim();
                    if (trimmedArg != null && trimmedArg.StartsWith("$") &&
                        trimmedArg.EndsWith("$"))
                    {
                        var formatContext = await context.GetContextForPath(trimmedArg.Trim('$'), scopeData);

                        await formatContext.EnsureValue();

                        argList.Add(new KeyValuePair <string, object>(formatterArgument.Name, formatContext.Value));
                    }
                    else
                    {
                        argList.Add(new KeyValuePair <string, object>(formatterArgument.Name, formatterArgument.Argument));
                    }
                }
                //we do NOT await the task here. We await the task only if we need the value
                context.Value = c.Format(argList.ToArray());
            }
            else
            {
                context.Value = c.Format(new KeyValuePair <string, object> [0]);
            }
            return(Children.WithScope(context));
        }
Ejemplo n.º 8
0
        private static async Promise LoopCollection(IByteCounterStream outputStream, ContextObject c, ScopeData scopeData,
                                                    Func <ContextObject, Promise> onItem, ICollection value)
        {
            var index        = 0;
            var innerContext =
                new ContextCollection(index, false, $"[{index}]", c, null)
                .MakeNatural() as ContextCollection;

            foreach (var item in value)
            {
                if (!ContinueBuilding(outputStream, scopeData))
                {
                    return;
                }
                innerContext.Index = index;
                innerContext.Last  = index + 1 == value.Count;
                innerContext.Value = item;
                await onItem(innerContext);

                index++;
            }
        }
        /// <inheritdoc />
        public override async Task <IEnumerable <DocumentItemExecution> > Render(IByteCounterStream outputStream,
                                                                                 ContextObject context,
                                                                                 ScopeData scopeData)
        {
            await Task.CompletedTask;
            string partialName    = Value;
            var    currentPartial = partialName + "_" + scopeData.PartialDepth.Count;

            scopeData.PartialDepth.Push(currentPartial);
            if (scopeData.PartialDepth.Count >= context.Options.PartialStackSize)
            {
                switch (context.Options.StackOverflowBehavior)
                {
                case ParserOptions.PartialStackOverflowBehavior.FailWithException:
                    throw new MustachioStackOverflowException(
                              $"You have exceeded the maximum stack Size for nested Partial calls of '{context.Options.PartialStackSize}'. See Data for call stack")
                          {
                              Data =
                              {
                                  { "Callstack", scopeData.PartialDepth }
                              }
                          };

                case ParserOptions.PartialStackOverflowBehavior.FailSilent:

                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            var scopeDataPartial = scopeData.Partials[partialName];

            return(new DocumentItemExecution[]
            {
                new DocumentItemExecution(scopeDataPartial, context),
            });
        }
Ejemplo n.º 10
0
        /// <inheritdoc />
        public override ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context,
                                                    ScopeData scopeData)
        {
            if (scopeData.CustomData.TryGetValue("TextOperationData", out var textOperations) &&
                textOperations is IList <ITextOperation> textOps)
            {
                foreach (var textOperation in textOps.ToArray())
                {
                    Value = textOperation.Apply(Value);
                    if (textOperation.TransientEdit)
                    {
                        textOps.Remove(textOperation);
                    }
                }
            }

            if (Value != string.Empty)
            {
                outputStream.Write(Value);
            }
            return(Children.WithScope(context).ToPromise());
        }
        /// <inheritdoc />
        public override ItemExecutionPromise Render(
            IByteCounterStream outputStream,
            ContextObject context,
            ScopeData scopeData)
        {
            if (Operation.IsModificator)
            {
                if (!scopeData.CustomData.TryGetValue("TextOperationData", out var operationList))
                {
                    operationList = new List <ITextOperation>();
                    scopeData.CustomData["TextOperationData"] = operationList;
                }
                (operationList as IList <ITextOperation>).Add(Operation);
            }
            else
            {
                outputStream.Write(Operation.Apply(string.Empty));
            }


            return(Enumerable.Empty <DocumentItemExecution>().ToPromise());
        }
Ejemplo n.º 12
0
        internal static void WriteContent(IByteCounterStream builder, string content, ContextObject context)
        {
            content = content ?? context.Options.Null;

            var sourceCount = builder.BytesWritten;

            if (context.Options.MaxSize == 0)
            {
                builder.Write(content);
                return;
            }

            if (sourceCount >= context.Options.MaxSize - 1)
            {
                builder.ReachedLimit = true;
                return;
            }

            //TODO this is a performance critical operation. As we might deal with variable-length encodings this cannot be compute initial
            var cl = context.Options.Encoding.GetByteCount(content);

            var overflow = sourceCount + cl - context.Options.MaxSize;

            if (overflow <= 0)
            {
                builder.Write(content, cl);
                return;
            }

            if (overflow < content.Length)
            {
                builder.Write(content.ToCharArray(0, (int)(cl - overflow)), cl - overflow);
            }
            else
            {
                builder.Write(content, cl);
            }
        }
Ejemplo n.º 13
0
        private async Promise CoreAction(IByteCounterStream outputStream,
                                         ContextObject c,
                                         ScopeData scopeData,
                                         Func <ContextObject, Promise> onItem)
        {
            if (!c.Exists())
            {
                return;
            }

            if (!(c.Value is IEnumerable value) || value is string || value is IDictionary <string, object> )
            {
                var path   = new Stack <string>();
                var parent = c.Parent;
                while (parent != null)
                {
                    path.Push(parent.Key);
                    parent = parent.Parent;
                }

                throw new IndexedParseException(CharacterLocationExtended.Empty,
                                                string.Format(
                                                    "{1}'{0}' is used like an array by the template, but is a scalar value or object in your model." +
                                                    " Complete Expression until Error:{2}",
                                                    MorestachioExpression, ExpressionStart,
                                                    (path.Count == 0 ? "Empty" : path.Aggregate((e, f) => e + "\r\n" + f))));
            }

            if (value is ICollection col)
            {
                await LoopCollection(outputStream, c, scopeData, onItem, col);
            }
            else
            {
                await LoopEnumerable(outputStream, c, scopeData, onItem, value);
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        ///		Processes the items and children.
        /// </summary>
        /// <param name="documentItems">The document items.</param>
        /// <param name="outputStream">The output stream.</param>
        /// <param name="context">The context.</param>
        /// <param name="scopeData">The scope data.</param>
        /// <returns></returns>
        public static async Promise ProcessItemsAndChildren(IEnumerable <IDocumentItem> documentItems,
                                                            IByteCounterStream outputStream,
                                                            ContextObject context,
                                                            ScopeData scopeData)
        {
            //we do NOT use a recursive loop to avoid stack overflows.

            var processStack = new Stack <DocumentItemExecution>();                                             //deep search. create a stack to go deeper into the tree without loosing work left on other branches

            foreach (var documentItem in documentItems.TakeWhile(e => ContinueBuilding(outputStream, context))) //abort as soon as the cancellation is requested OR the template size is reached
            {
                processStack.Push(new DocumentItemExecution(documentItem, context));
                while (processStack.Any() && ContinueBuilding(outputStream, context))
                {
                    var currentDocumentItem = processStack.Pop();                    //take the current branch
                    var next = await currentDocumentItem.DocumentItem.Render(outputStream, currentDocumentItem.ContextObject, scopeData);

                    foreach (var item in next.Reverse())                     //we have to reverse the list as the logical first item returned must be the last inserted to be the next that pops out
                    {
                        processStack.Push(item);
                    }
                }
            }
        }
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream,
                                                          ContextObject context,
                                                          ScopeData scopeData)
        {
            Tuple <IDocumentItem, ContextObject> action  = null;
            Tuple <IDocumentItem, ContextObject> actiona = null;

            var partialName = await(await MorestachioExpression.GetValue(context, scopeData)).RenderToString(scopeData);

            if (partialName == null)
            {
                throw new MorestachioRuntimeException($"Get partial requested by the expression: '{MorestachioExpression.ToString()}' returned null and is therefor not valid");
            }

            action = await CoreAction(context, scopeData, (pn, cnxt) =>
            {
                if (scopeData.Partials.TryGetValue(pn, out var partialWithContext))
                {
                    actiona = new Tuple <IDocumentItem, ContextObject>(partialWithContext, cnxt);
                    return(true.ToPromise());
                }

                return(false.ToPromise());
            }, partialName);

            action = action ?? actiona;
            if (action != null)
            {
                return(new[]
                {
                    new DocumentItemExecution(action.Item1, action.Item2),
                    new DocumentItemExecution(new RenderPartialDoneDocumentItem(), action.Item2),
                });
            }
            return(Enumerable.Empty <DocumentItemExecution>());
        }
Ejemplo n.º 16
0
 /// <summary>
 ///		Renders the <see cref="IRenderer.Document"/>
 /// </summary>
 public static MorestachioDocumentResultPromise RenderAsync(this IRenderer renderer, object data, IByteCounterStream targetStream)
 {
     return(renderer.RenderAsync(data, CancellationToken.None, targetStream));
 }
Ejemplo n.º 17
0
 /// <summary>
 ///		Renders the <see cref="IRenderer.Document"/> and awaits synchronously
 /// </summary>
 public static MorestachioDocumentResult Render(this IRenderer renderer, object data, CancellationToken token, IByteCounterStream targetStream)
 {
     return(renderer.RenderAsync(data, token, targetStream).GetAwaiter().GetResult());
 }
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream,
                                                          ContextObject context,
                                                          ScopeData scopeData)
        {
            string partialName = Value;

            scopeData.PartialDepth.Push(new Tuple <string, int>(partialName, scopeData.PartialDepth.Count));
            if (scopeData.PartialDepth.Count >= scopeData.ParserOptions.PartialStackSize)
            {
                switch (scopeData.ParserOptions.StackOverflowBehavior)
                {
                case PartialStackOverflowBehavior.FailWithException:
                    throw new MustachioStackOverflowException(
                              $"You have exceeded the maximum stack Size for nested Partial calls of '{scopeData.ParserOptions.PartialStackSize}'. See Data for call stack")
                          {
                              Data =
                              {
                                  { "Callstack", scopeData.PartialDepth }
                              }
                          };

                case PartialStackOverflowBehavior.FailSilent:
                    return(new DocumentItemExecution[0]);

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            var cnxt = context;

            scopeData.AddVariable("$name",
                                  (scope) => scopeData.ParserOptions.CreateContextObject("$name", partialName, cnxt), 0);

            if (Context != null)
            {
                cnxt = (await Context.GetValue(context, scopeData));
            }

            scopeData.AddVariable("$recursion",
                                  (scope) => scopeData.ParserOptions.CreateContextObject("$recursion", scope.PartialDepth.Count, cnxt), 0);

            if (scopeData.Partials.TryGetValue(partialName, out var partialWithContext))
            {
                return(new[]
                {
                    new DocumentItemExecution(partialWithContext, cnxt),
                    new DocumentItemExecution(new RenderPartialDoneDocumentItem(), cnxt),
                });
            }


            if (scopeData.ParserOptions.PartialsStore != null)
            {
                MorestachioDocumentInfo partialFromStore;
                if (scopeData.ParserOptions.PartialsStore is IAsyncPartialsStore asyncPs)
                {
                    partialFromStore = await asyncPs.GetPartialAsync(partialName, scopeData.ParserOptions);
                }
                else
                {
                    partialFromStore = scopeData.ParserOptions.PartialsStore.GetPartial(partialName, scopeData.ParserOptions);
                }

                if (partialFromStore != null)
                {
                    if (partialFromStore.Errors.Any())
                    {
                        throw new MorestachioRuntimeException($"The partial named '{partialName}' obtained from external partial store contains one or more errors");
                    }

                    return(new[]
                    {
                        new DocumentItemExecution(partialFromStore.Document, cnxt),
                        new DocumentItemExecution(new RenderPartialDoneDocumentItem(), cnxt),
                    });
                }
            }


            throw new MorestachioRuntimeException($"Could not obtain a partial named '{partialName}' from the template nor the Partial store");
        }
Ejemplo n.º 19
0
 /// <summary>
 ///		Defines an option that does nothing
 /// </summary>
 /// <param name="outputStream"></param>
 /// <param name="context"></param>
 /// <param name="scopeData"></param>
 /// <returns></returns>
 public static Promise NopAction(IByteCounterStream outputStream,
                                 ContextObject context,
                                 ScopeData scopeData)
 {
     return(AsyncHelper.FakePromise());
 }
Ejemplo n.º 20
0
 /// <inheritdoc />
 public abstract ItemExecutionPromise Render(IByteCounterStream outputStream,
                                             ContextObject context,
                                             ScopeData scopeData);
Ejemplo n.º 21
0
        /// <exception cref="IndexedParseException"></exception>
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
        {
            var c = await MorestachioExpression.GetValue(context, scopeData);

            if (!c.Exists())
            {
                return(new DocumentItemExecution[0]);
            }

            if (!(c.Value is IEnumerable value) || value is string || value is IDictionary <string, object> )
            {
                var path   = new Stack <string>();
                var parent = context.Parent;
                while (parent != null)
                {
                    path.Push(parent.Key);
                    parent = parent.Parent;
                }

                throw new IndexedParseException(CharacterLocationExtended.Empty,
                                                string.Format("{1}'{0}' is used like an array by the template, but is a scalar value or object in your model." + " Complete Expression until Error:{2}",
                                                              MorestachioExpression.ToString(), base.ExpressionStart, (path.Count == 0 ? "Empty" : path.Aggregate((e, f) => e + "\r\n" + f))));
            }

            var scopes = new List <DocumentItemExecution>();

            //var items = value.OfType<object>().ToArray();
            //var result = new WrapperCounterStream[items.Length];

            //Parallel.ForEach(items, async (item, state, index) =>
            //{
            //	var innerContext =
            //		new ContextCollection(index, items.Length == index, context.Options, $"[{index}]", c, item)
            //			.MakeNatural();
            //	var stream = new WrapperCounterStream(outputStream, context.Options);
            //	await MorestachioDocument.ProcessItemsAndChildren(Children, stream, innerContext, scopeData);
            //	result[index] = stream;
            //});

            //foreach (var byteCounterStream in result)
            //{
            //	byteCounterStream.Write(byteCounterStream.Read());
            //}

            //return Enumerable.Empty<DocumentItemExecution>();
            //Use this "lookahead" enumeration to allow the $last keyword
            var index      = 0;
            var enumerator = value.GetEnumerator();

            if (!enumerator.MoveNext())
            {
                return(Enumerable.Empty <DocumentItemExecution>());
            }

            var current = enumerator.Current;

            do
            {
                var next = enumerator.MoveNext() ? enumerator.Current : null;

                var innerContext =
                    new ContextCollection(index, next == null, context.Options, $"[{index}]", c, current)
                    .MakeNatural();
                scopes.AddRange(Children.WithScope(innerContext));
                index++;
                current = next;
            } while (current != null && ContinueBuilding(outputStream, context));

            return(scopes);
        }
Ejemplo n.º 22
0
 /// <inheritdoc />
 public override ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
 {
     scopeData.RemoveVariable(Value, IdVariableScope);
     return(Enumerable.Empty <DocumentItemExecution>().ToPromise());
 }
Ejemplo n.º 23
0
            /// <inheritdoc />
            public override async ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
            {
                await _action(outputStream, context, scopeData, Value, TagKeyword);

                return(Array.Empty <DocumentItemExecution>());
            }
Ejemplo n.º 24
0
 /// <inheritdoc />
 public abstract Task <IEnumerable <DocumentItemExecution> > Render(IByteCounterStream outputStream,
                                                                    ContextObject context,
                                                                    ScopeData scopeData);
Ejemplo n.º 25
0
 internal MorestachioDocumentResult(IByteCounterStream stream,
                                    PerformanceProfiler profiler)
 {
     Stream   = stream;
     Profiler = profiler;
 }
Ejemplo n.º 26
0
 /// <inheritdoc />
 public override ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context,
                                             ScopeData scopeData)
 {
     scopeData.Partials[Value] = Partial;
     return(Enumerable.Empty <DocumentItemExecution>().ToPromise());
 }
 /// <inheritdoc />
 public override ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
 {
     return(Children.WithScope(context).ToPromise());
 }
Ejemplo n.º 28
0
 /// <summary>
 ///     Can be called to check if any stop is requested. If return true no stop is requested
 /// </summary>
 protected static bool ContinueBuilding(IByteCounterStream builder, ContextObject context)
 {
     return(!context.AbortGeneration && !context.CancellationToken.IsCancellationRequested &&
            !builder.ReachedLimit);
 }
        /// <inheritdoc />
        public override async ItemExecutionPromise Render(IByteCounterStream outputStream,
                                                          ContextObject context,
                                                          ScopeData scopeData)
        {
            string partialName    = Value;
            var    currentPartial = partialName + "_" + scopeData.PartialDepth.Count;

            scopeData.PartialDepth.Push(currentPartial);
            if (scopeData.PartialDepth.Count >= context.Options.PartialStackSize)
            {
                switch (context.Options.StackOverflowBehavior)
                {
                case PartialStackOverflowBehavior.FailWithException:
                    throw new MustachioStackOverflowException(
                              $"You have exceeded the maximum stack Size for nested Partial calls of '{context.Options.PartialStackSize}'. See Data for call stack")
                          {
                              Data =
                              {
                                  { "Callstack", scopeData.PartialDepth }
                              }
                          };

                case PartialStackOverflowBehavior.FailSilent:
                    return(new DocumentItemExecution[0]);

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            var cnxt = context;

            if (Context != null)
            {
                cnxt = (await Context.GetValue(context, scopeData));
            }

            scopeData.AddVariable("$recursion",
                                  (scope) => cnxt.Options.CreateContextObject("$recursion", context.CancellationToken,
                                                                              scope.PartialDepth.Count, cnxt), 0);

            if (scopeData.Partials.TryGetValue(partialName, out var partialWithContext))
            {
                return(new[]
                {
                    new DocumentItemExecution(partialWithContext, cnxt),
                    new DocumentItemExecution(new RenderPartialDoneDocumentItem(), cnxt),
                });
            }

            var partialFromStore = context.Options.PartialsStore?.GetPartial(partialName)?.Document;

            if (partialFromStore != null)
            {
                return(new[]
                {
                    new DocumentItemExecution(partialFromStore, cnxt),
                    new DocumentItemExecution(new RenderPartialDoneDocumentItem(), cnxt),
                });
            }

            throw new MorestachioRuntimeException($"Could not obtain a partial named '{partialName}' from the template nor the Partial store");
        }
Ejemplo n.º 30
0
            /// <inheritdoc />
            public override async ItemExecutionPromise Render(IByteCounterStream outputStream, ContextObject context, ScopeData scopeData)
            {
                return(await _action(outputStream, context, scopeData, Value, Children));

                //return Array.Empty<DocumentItemExecution>();
            }