Skip to content

Commit

Permalink
#382 Add parameterless generic AddLogConsumer method to AtataContextB…
Browse files Browse the repository at this point in the history
…uilder
  • Loading branch information
YevgeniyShunevych committed Aug 20, 2020
1 parent 8c196e7 commit 9b53555
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Atata/Context/AtataContextBuilder.cs
Expand Up @@ -174,6 +174,18 @@ public RemoteDriverAtataContextBuilder UseRemoteDriver()
return UseDriver(new RemoteDriverAtataContextBuilder(BuildingContext));
}

/// <summary>
/// Adds the log consumer.
/// </summary>
/// <typeparam name="TLogConsumer">
/// The type of the log consumer.
/// Should have default constructor.
/// </typeparam>
/// <returns>The <see cref="AtataContextBuilder{TLogConsumer}"/> instance.</returns>
public AtataContextBuilder<TLogConsumer> AddLogConsumer<TLogConsumer>()
where TLogConsumer : ILogConsumer, new() =>
AddLogConsumer(new TLogConsumer());

/// <summary>
/// Adds the log consumer.
/// </summary>
Expand Down

0 comments on commit 9b53555

Please sign in to comment.