Skip to content

Commit

Permalink
add some comments for ServiceCollectionExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
Ershad95 committed May 22, 2024
1 parent a3679aa commit cbdd9e7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ServiceCollector.Core/IServieCollectionExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,20 @@ private static void ServiceDiscovery(IEnumerable<Assembly> assemblies, IServiceC
}
}

/// <summary>
/// add all services that exist in all assemblies
/// </summary>
/// <param name="serviceCollection"></param>
public static void AddServiceDiscovery(this IServiceCollection serviceCollection)
{
ServiceDiscovery(AppDomain.CurrentDomain.GetAssemblies(), serviceCollection);
}

/// <summary>
/// add services that exist in selected assemblies if list of assemblies are empty collect services that exist in all assemblies
/// </summary>
/// <param name="serviceCollection"></param>
/// <param name="assemblies"></param>
public static void AddServiceDiscovery(this IServiceCollection serviceCollection, Assembly[] assemblies)
{
ArgumentNullException.ThrowIfNull(assemblies);
Expand Down

0 comments on commit cbdd9e7

Please sign in to comment.