// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.IO; namespace Microsoft.Extensions.RazorViews { /// /// Represents a deferred write operation in a . /// internal class HelperResult { /// /// Creates a new instance of . /// /// The delegate to invoke when is called. public HelperResult(Action action) { WriteAction = action; } public Action WriteAction { get; } /// /// Method invoked to produce content from the . /// /// The instance to write to. public void WriteTo(TextWriter writer) { WriteAction(writer); } } }