HelperResult Class¶
Represents a deferred write operation in a Microsoft.AspNetCore.Mvc.Razor.RazorPage
.
- Namespace
Microsoft.AspNetCore.Mvc.Razor
- Assemblies
- Microsoft.AspNetCore.Mvc.Razor
Constructors¶
-
HelperResult
(System.Func<System.IO.TextWriter, System.Threading.Tasks.Task>)¶ Creates a new instance of
Microsoft.AspNetCore.Mvc.Razor.HelperResult
.Arguments: asyncAction (System.Func<System.IO.TextWriter>) – The asynchronous delegate to invoke when Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
is called.public HelperResult(Func<TextWriter, Task> asyncAction)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Razor.HelperResult.
WriteAction
¶ Gets the asynchronous delegate to invoke when
Microsoft.AspNetCore.Mvc.Razor.HelperResult.WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)
is called.Return type: System.Func<System.IO.TextWriter> public Func<TextWriter, Task> WriteAction { get; }
-
Methods¶
-
WriteTo
(System.IO.TextWriter, System.Text.Encodings.Web.HtmlEncoder)¶ Method invoked to produce content from the
Microsoft.AspNetCore.Mvc.Razor.HelperResult
.Arguments: - writer (System.IO.TextWriter) – The
System.IO.TextWriter
instance to write to. - encoder (System.Text.Encodings.Web.HtmlEncoder) – The
System.Text.Encodings.Web.HtmlEncoder
to encode the content.
public virtual void WriteTo(TextWriter writer, HtmlEncoder encoder)
- writer (System.IO.TextWriter) – The
-