Skip to content

Commit

Permalink
Add #nullable enable to ILogConsumer, INamedLogConsumer, `IInit…
Browse files Browse the repository at this point in the history
…ializableLogConsumer` and `LogConsumerBuilderExtensions`
  • Loading branch information
YevgeniyShunevych committed Jan 18, 2025
1 parent fb94e02 commit 5d6411e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/Atata/Context/LogConsumerBuilderExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Atata;
#nullable enable

namespace Atata;

/// <summary>
/// Provides extension methods for <see cref="LogConsumerBuilder{TLogConsumer}"/>.
Expand All @@ -14,7 +16,7 @@ public static class LogConsumerBuilderExtensions
/// <returns>The same builder instance.</returns>
public static LogConsumerBuilder<TLogConsumer> WithLoggerName<TLogConsumer>(
this LogConsumerBuilder<TLogConsumer> builder,
string loggerName)
string? loggerName)
where TLogConsumer : INamedLogConsumer
{
builder.Consumer.LoggerName = loggerName;
Expand Down
4 changes: 3 additions & 1 deletion src/Atata/Logging/IInitializableLogConsumer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Atata;
#nullable enable

namespace Atata;

/// <summary>
/// An interface of log consumer that requires initialization.
Expand Down
4 changes: 3 additions & 1 deletion src/Atata/Logging/ILogConsumer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Atata;
#nullable enable

namespace Atata;

/// <summary>
/// Defines a method to log the event information.
Expand Down
6 changes: 4 additions & 2 deletions src/Atata/Logging/INamedLogConsumer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace Atata;
#nullable enable

namespace Atata;

/// <summary>
/// Represents the log consumer that provides the logger name.
Expand All @@ -8,5 +10,5 @@ public interface INamedLogConsumer : ILogConsumer
/// <summary>
/// Gets or sets the name of the logger.
/// </summary>
string LoggerName { get; set; }
string? LoggerName { get; set; }
}

0 comments on commit 5d6411e

Please sign in to comment.