Serilog.Sinks.MicrosoftTeams/Serilog.Sinks.MicrosoftTeams/LoggerConfigurationMicrosoftTeamsExtensions.cs
/// <summary>
/// <see cref="LoggerSinkConfiguration"/> extension that provides configuration chaining.
/// <example>
///     new LoggerConfiguration()
///         .MinimumLevel.Verbose()
///         .WriteTo.MicrosoftTeams("webHookUri")
///         .CreateLogger();
/// </example>
/// </summary>
/// <param name="loggerSinkConfiguration">Instance of <see cref="LoggerSinkConfiguration"/> object.</param>
/// <param name="webHookUri">The incoming web hook URI to the Microsoft Teams channel.</param>
/// <param name="title">The title of messages.</param>
/// <param name="batchSizeLimit">The maximum number of events to post in a single batch; defaults to 1 if
/// not provided i.e. no batching by default.</param>
/// <param name="period">The time to wait between checking for event batches; defaults to 1 sec if not
/// provided.</param>
/// <param name="formatProvider">The format provider used for formatting the message.</param>
/// <param name="restrictedToMinimumLevel"><see cref="LogEventLevel"/> value that specifies minimum logging
/// level that will be allowed to be logged.</param>
/// <returns>Instance of <see cref="LoggerConfiguration"/> object.</returns>
extension that provides configuration chaining.


extension that provides configuration chaining .
public static LoggerConfiguration MicrosoftTeams(
            this LoggerSinkConfiguration loggerSinkConfiguration,
            string webHookUri,
            string title = null,
            int? batchSizeLimit = null,
            TimeSpan? period = null,
            IFormatProvider formatProvider = null,
            LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum)
        {
            var microsoftTeamsSinkOptions = new MicrosoftTeamsSinkOptions(webHookUri, title, batchSizeLimit, period, formatProvider);
            return loggerSinkConfiguration.MicrosoftTeams(microsoftTeamsSinkOptions, restrictedToMinimumLevel);
        }
public static LoggerConfiguration MicrosoftTeams ( this LoggerSinkConfiguration loggerSinkConfiguration , string webHookUri , string title = null , int ? batchSizeLimit = null , TimeSpan ? period = null , IFormatProvider formatProvider = null , LogEventLevel restrictedToMinimumLevel = LevelAlias . Minimum ) { var microsoftTeamsSinkOptions = new MicrosoftTeamsSinkOptions ( webHookUri , title , batchSizeLimit , period , formatProvider ) ; return loggerSinkConfiguration . MicrosoftTeams ( microsoftTeamsSinkOptions , restrictedToMinimumLevel ) ; }
extension that provides configuration chaining.
extension that provides configuration chaining .
Instance of  object.
Instance of object .
LoggerSinkConfiguration
this
webHookUri
string
The incoming web hook URI to the Microsoft Teams channel.
The incoming web hook URI to the Microsoft Teams channel .
title
string
The title of messages.
The title of messages .
batchSizeLimit
int?
The maximum number of events to post in a single batch; defaults to 1 if
not provided i.e. no batching by default.
The maximum number of events to post in a single batch ; defaults to 1 if not provided i . e . no batching by default .
1 if
not provided i.e. no batching by default
period
TimeSpan?
The time to wait between checking for event batches; defaults to 1 sec if not
provided.
The time to wait between checking for event batches ; defaults to 1 sec if not provided .
1 sec if not
provided
formatProvider
IFormatProvider
The format provider used for formatting the message.
The format provider used for formatting the message .
restrictedToMinimumLevel
LogEventLevel
value that specifies minimum logging
level that will be allowed to be logged.
value that specifies minimum logging level that will be allowed to be logged .
loggerSinkConfiguration
Instance of  object.
Instance of object .