Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ public static IServiceCollection AddGatewayHandler<T>(this IServiceCollection se
return services;
}

/// <summary>
/// Adds an <see cref="IGatewayHandler"/> to the specified <see cref="IServiceCollection"/>.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to add the <see cref="IGatewayHandler"/> to.</param>
/// <param name="handlerType">The type of the <see cref="IGatewayHandler"/> to add.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public static IServiceCollection AddGatewayHandler(this IServiceCollection services, [DAM(DAMT.PublicConstructors)] Type handlerType)
{
services.AddSingleton(typeof(IGatewayHandler), handlerType);
return services;
}

/// <summary>
/// Adds an <see cref="IGatewayHandler"/> to the specified <see cref="IServiceCollection"/>.
/// </summary>
Expand Down Expand Up @@ -97,6 +109,18 @@ public static IServiceCollection AddShardedGatewayHandler<T>(this IServiceCollec
return services;
}

/// <summary>
/// Adds an <see cref="IShardedGatewayHandler"/> to the specified <see cref="IServiceCollection"/>.
/// </summary>
/// <param name="services">The <see cref="IServiceCollection"/> to add the <see cref="IShardedGatewayHandler"/> to.</param>
/// <param name="handlerType">The type of the <see cref="IShardedGatewayHandler"/> to add.</param>
/// <returns>A reference to this instance after the operation has completed.</returns>
public static IServiceCollection AddShardedGatewayHandler(this IServiceCollection services, [DAM(DAMT.PublicConstructors)] Type handlerType)
{
services.AddSingleton(typeof(IShardedGatewayHandler), handlerType);
return services;
}

/// <summary>
/// Adds an <see cref="IShardedGatewayHandler"/> to the specified <see cref="IServiceCollection"/>.
/// </summary>
Expand Down