public override object Execute(RTExecutionContext context)
 {
     StringBuilder sb = new StringBuilder();
     context.PushScope(new RTScope(null));
     foreach (var func in _items)
     {
         var result = func.Execute(context);
         if (!context.HasError && result != null && !(result is RTVoid))
         {
             sb.Append(result);
         }
     }
     context.PopScope();
     if (!context.HasError) return sb.ToString();
     else return null;
 }
Example #2
0
        public object Execute(RTExecutionContext context)
        {
            if (Creator == null)
                throw new InvalidOperationException(ErrorMessages.Scope_Execute_Error);

            RTScope exeScope = _executed ? Duplicate() : this;
            context.PushScope(exeScope);
            var retval = Creator.Metadata.Execute(context);
            context.PopScope();
            exeScope._executed = true;

            return retval;
        }