Skip to content

Commit

Permalink
remove default
Browse files Browse the repository at this point in the history
  • Loading branch information
sungam3r committed Jan 3, 2024
1 parent 1ced9fc commit 5f663ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/SteroidsDI.Tests/Cases.Approval/SteroidsDI.approved.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ namespace SteroidsDI
public Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; }
public SteroidsDI.BindingContext<TService> Default<TImplementation>()
where TImplementation : TService { }
public SteroidsDI.BindingContext<TService> Default<TImplementation>(Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = 2)
public SteroidsDI.BindingContext<TService> Default<TImplementation>(Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime)
where TImplementation : TService { }
public SteroidsDI.BindingContext<TService> Named<TImplementation>(object name)
where TImplementation : TService { }
public SteroidsDI.BindingContext<TService> Named<TImplementation>(object name, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime = 2)
public SteroidsDI.BindingContext<TService> Named<TImplementation>(object name, Microsoft.Extensions.DependencyInjection.ServiceLifetime lifetime)
where TImplementation : TService { }
}
public sealed class GenericScopeProvider<T> : SteroidsDI.Core.IScopeProvider
Expand Down
4 changes: 2 additions & 2 deletions src/SteroidsDI/Factory/BindingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public BindingContext(IServiceCollection services)
/// </param>
/// <param name="lifetime">The lifetime of the dependency object.</param>
/// <returns>Reference to <c>this</c> to be able to call methods in a chain.</returns>
public BindingContext<TService> Named<TImplementation>(object name, ServiceLifetime lifetime = ServiceLifetime.Transient)
public BindingContext<TService> Named<TImplementation>(object name, ServiceLifetime lifetime)
where TImplementation : TService
{
if (name == null)
Expand Down Expand Up @@ -77,7 +77,7 @@ public BindingContext<TService> Named<TImplementation>(object name)
/// <typeparam name="TImplementation">Implementation type.</typeparam>
/// <param name="lifetime">The lifetime of the dependency object.</param>
/// <returns>Reference to <c>this</c> to be able to call methods in a chain.</returns>
public BindingContext<TService> Default<TImplementation>(ServiceLifetime lifetime = ServiceLifetime.Transient)
public BindingContext<TService> Default<TImplementation>(ServiceLifetime lifetime)
where TImplementation : TService
{
var existing = Services.SingleOrDefault(descriptor => descriptor.ServiceType == typeof(TImplementation));
Expand Down

0 comments on commit 5f663ad

Please sign in to comment.