5320c9ec20
* Fixed wrong LeveldDebug method calls after moving logic from providers to router * Added independent "IndentFlags" property to inner debugger class * Fixed debug logging in few places * Removed "ICollectingOptions" and merged it with new options abstract "ITelegratorOptions" * Added WebHook version of hosting class
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
namespace Telegrator.Hosting
|
|
{
|
|
/// <summary>
|
|
/// Settings os hosted Telegram bot
|
|
/// </summary>
|
|
public class TelegramBotHostBuilderSettings() : TelegratorOptions
|
|
{
|
|
/// <inheritdoc cref="HostApplicationBuilderSettings.DisableDefaults"/>
|
|
public bool DisableDefaults { get; set; }
|
|
|
|
/// <inheritdoc cref="HostApplicationBuilderSettings.Args"/>
|
|
public string[]? Args { get; set; }
|
|
|
|
/// <inheritdoc cref="HostApplicationBuilderSettings.Configuration"/>
|
|
public ConfigurationManager? Configuration { get; set; }
|
|
|
|
/// <inheritdoc cref="HostApplicationBuilderSettings.EnvironmentName"/>
|
|
public string? EnvironmentName { get; set; }
|
|
|
|
/// <inheritdoc cref="HostApplicationBuilderSettings.ApplicationName"/>
|
|
public string? ApplicationName { get; set; }
|
|
|
|
/// <inheritdoc cref="HostApplicationBuilderSettings.ContentRootPath"/>
|
|
public string? ContentRootPath { get; set; }
|
|
|
|
internal HostApplicationBuilderSettings ToApplicationBuilderSettings() => new HostApplicationBuilderSettings()
|
|
{
|
|
DisableDefaults = DisableDefaults,
|
|
Args = Args,
|
|
Configuration = Configuration,
|
|
EnvironmentName = EnvironmentName,
|
|
ApplicationName = ApplicationName,
|
|
ContentRootPath = ContentRootPath
|
|
};
|
|
}
|
|
}
|