/// <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))); }
/// <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))); }
/// <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)); }