Files
Telegrator/Telegrator.Hosting.Web/TelegramBotWebOptions.cs
T

42 lines
1.4 KiB
C#
Raw Normal View History

using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Options;
using System.Diagnostics.CodeAnalysis;
2025-07-24 23:19:59 +04:00
namespace Telegrator.Hosting.Web
{
/// <summary>
/// Options for configuring the behavior for TelegramBotWebHost.
/// </summary>
public class TelegramBotWebOptions : TelegratorOptions
2025-07-24 23:19:59 +04:00
{
/// <summary>
/// Disables automatic configuration for all of required <see cref="IOptions{TOptions}"/> instances
2025-07-24 23:19:59 +04:00
/// </summary>
public bool DisableAutoConfigure { get; set; }
/// <inheritdoc cref="WebApplicationOptions.Args"/>
public string[]? Args { get; init; }
/// <inheritdoc cref="WebApplicationOptions.EnvironmentName"/>
public string? EnvironmentName { get; init; }
/// <inheritdoc cref="WebApplicationOptions.ApplicationName"/>
public string? ApplicationName { get; init; }
/// <inheritdoc cref="WebApplicationOptions.ContentRootPath"/>
public string? ContentRootPath { get; init; }
/// <inheritdoc cref="WebApplicationOptions.WebRootPath"/>
public string? WebRootPath { get; init; }
internal WebApplicationOptions ToWebApplicationOptions() => new WebApplicationOptions()
{
ApplicationName = ApplicationName,
Args = Args,
ContentRootPath = ContentRootPath,
EnvironmentName = EnvironmentName,
WebRootPath = WebRootPath
};
2025-07-24 23:19:59 +04:00
}
}