/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Shared/RazorViews/HelperResult.cs
33 строки
996 B
Brennan
Add rule to seal internal and private types (#41457)
05 май 2022, 19:26
Не верифицирован
05 май 2022, 19:26
3ea008c
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System; using System.IO; namespace Microsoft.Extensions.RazorViews; /// <summary> /// Represents a deferred write operation in a <see cref="BaseView"/>. /// </summary> internal sealed class HelperResult { /// <summary> /// Creates a new instance of <see cref="HelperResult"/>. /// </summary> /// <param name="action">The delegate to invoke when <see cref="WriteTo(TextWriter)"/> is called.</param> public HelperResult(Action<TextWriter> action) { WriteAction = action; } public Action<TextWriter> WriteAction { get; } /// <summary> /// Method invoked to produce content from the <see cref="HelperResult"/>. /// </summary> /// <param name="writer">The <see cref="TextWriter"/> instance to write to.</param> public void WriteTo(TextWriter writer) { WriteAction(writer); } }