Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
guibranco committed Jul 20, 2024
1 parent 49e696b commit 7503b55
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions Src/CrispyWaffle/Composition/ServiceLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,17 +685,22 @@ public static void Register<TContract, TImplementation>(Lifetime lifetime)
}

/// <summary>
/// A register with a custom instance creator as a function.
/// Registers the specified instance creator.
/// </summary>
/// <typeparam name="TContract">The interface binding implementation.</typeparam>
/// <param name="instanceCreator">
/// The instance creator for an implementation onf <typeparamref name="TContract"/>.
/// </param>
/// <param name="lifetime">The lifecycle lifetime of the registration.</param>
public static void Register<TContract>(
Func<TContract> instanceCreator,
Lifetime lifetime = Lifetime.Transient
)
/// <typeparam name="TContract">The type of the t contract.</typeparam>
/// <param name="instanceCreator">The instance creator.</param>
public static void Register<TContract>(Func<TContract> instanceCreator)
{
RegisterWithLifetimeCreatorInternal(Lifetime.Transient, instanceCreator);
}

Check warning on line 695 in Src/CrispyWaffle/Composition/ServiceLocator.cs

View check run for this annotation

Codecov / codecov/patch

Src/CrispyWaffle/Composition/ServiceLocator.cs#L694-L695

Added lines #L694 - L695 were not covered by tests

/// <summary>
/// Registers the specified instance creator.
/// </summary>
/// <typeparam name="TContract">The type of the t contract.</typeparam>
/// <param name="instanceCreator">The instance creator.</param>
/// <param name="lifetime">The lifetime.</param>
public static void Register<TContract>(Func<TContract> instanceCreator, Lifetime lifetime)
{
RegisterWithLifetimeCreatorInternal(lifetime, instanceCreator);
}
Expand Down

0 comments on commit 7503b55

Please sign in to comment.