コード例 #1
0
        /// <summary>
        /// Executes the specified action against
        /// the current context and captures an output string.
        /// </summary>
        /// <param name="block">The action to execute</param>
        /// <param name="parameter">The parameter for the action.</param>
        public string Block <T>(Action <T> block, T parameter)
        {
            BlockRenderer br =
                new BlockRenderer(_context.Context);

            return(br.Capture(() => block(parameter)));
        }
コード例 #2
0
        /// <summary>
        /// Executes the specified action against
        /// the current context and captures an output string.
        /// </summary>
        /// <param name="block">The action to execute</param>
        /// <param name="arg1">The first argument of the action.</param>
        /// <param name="arg2">The second argument of the action.</param>
        /// <param name="arg3">The third argument of the action.</param>
        public string Block <T1, T2, T3>(Action <T1, T2, T3> block, T1 arg1, T2 arg2, T3 arg3)
        {
            BlockRenderer br =
                new BlockRenderer(_context.Context);

            return(br.Capture(() => block(arg1, arg2, arg3)));
        }
コード例 #3
0
        /// <summary>
        /// Executes the specified action against
        /// the current context and captures an output string.
        /// </summary>
        /// <param name="block">The action to execute</param>
        public string Block(Action block)
        {
            BlockRenderer br =
                new BlockRenderer(_context.Context);

            return(br.Capture(block));
        }