示例#1
0
        public IFieldRenderingResult Render(object parameters = null)
        {
            var renderFieldArgs = new RenderFieldArgs()
            {
                Item      = item,
                FieldName = fieldName
            };

            if (parameters != null)
            {
                renderFieldArgs.ApplyParameters(parameters);
            }

            CorePipeline.Run(renderFieldPipeline, renderFieldArgs);
            var result = renderFieldArgs.Result;

            var beginResult = result?.FirstPart;
            var endResult   = result?.LastPart;

            var renderingResult = new FieldRenderingResult(beginResult, endResult);

            RenderingResult = renderingResult.Some <IFieldRenderingResult>();

            return(renderingResult);
        }
示例#2
0
        public IFieldRenderingResult Render(object parameters = null)
        {
            var renderFieldArgs = new RenderFieldArgs()
            {
                Item = item,
                FieldName = fieldName
            };

            if (parameters != null)
            {
                renderFieldArgs.ApplyParameters(parameters);
            }

            CorePipeline.Run(renderFieldPipeline, renderFieldArgs);
            var result = renderFieldArgs.Result;

            var beginResult = result?.FirstPart;
            var endResult = result?.LastPart;

            var renderingResult = new FieldRenderingResult(beginResult, endResult);
            RenderingResult = renderingResult.Some<IFieldRenderingResult>();

            return renderingResult;
        }