Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency v3.0 #61

Open
andreise opened this issue Dec 13, 2023 · 0 comments
Open

Dependency v3.0 #61

andreise opened this issue Dec 13, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@andreise
Copy link
Member

andreise commented Dec 13, 2023

Renaming methods

Intro

Each of Dependency<T>..Dependency<T1, T2, T3, T4, T5, T6, T7, TRest> has following overloads of With methods like this (using Dependency<T> as an example):

  1. Dependency<T, T2 ...> With<T2 ...>(T2 second ...) // corresponds to Dependency<T>.Of(...) factories
  2. Dependency<T, T2 ...> With<T2 ...>(Dependency<T2 ...> other)
  3. Dependency<T, T2 ...> With<T2 ...>(Func<T2> second ...) // corresponds to Dependency<T>.From(Func<T2> second ...) factories
  4. Dependency<T, T2 ...> With<T2 ...>(Func<IServiceProvider, T2> second ...) // corresponds to Dependency<T>.From(Func<IServiceProvider, T2> second ...) factories

What to do

  1. For each Dependency<...> rename all the With<T2 ...>(T2 second ...) methods to Add (as corresponding to the Of factories).
    Keep the old With methods as wrappers of the new Add methods (directly, without creation of the inner implementation), and deprecate the old methods with "This method is obsolete. Call Add instead." message and the error set.
  2. For each Dependency<...> rename all the With<T2 ...>(Dependency<T2 ...> other) methods to Concat.
    Rename the corresponding InnerWith to InnerConcat.
    Keep the old With methods as wrappers of the new InnerConcat methods (with keeping validation of the arguments for null), and deprecate the old methods with "This method is obsolete. Call Concat instead." message and the error set.
  3. Copy-paste the tests of the obsolete methods to test the new methods. Mark the obsoletes' methods as obsolete to allow their compilation.

.NET targets

Remove .NET 7.0 target

@andreise andreise added the enhancement New feature or request label Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants