You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
Dependency<T, T2 ...> With<T2 ...>(T2 second ...) // corresponds to Dependency<T>.Of(...) factories
Dependency<T, T2 ...> With<T2 ...>(Func<T2> second ...) // corresponds to Dependency<T>.From(Func<T2> second ...) factories
Dependency<T, T2 ...> With<T2 ...>(Func<IServiceProvider, T2> second ...) // corresponds to Dependency<T>.From(Func<IServiceProvider, T2> second ...) factories
What to do
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.
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.
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
The text was updated successfully, but these errors were encountered:
Renaming methods
Intro
Each of
Dependency<T>
..Dependency<T1, T2, T3, T4, T5, T6, T7, TRest>
has following overloads ofWith
methods like this (usingDependency<T>
as an example):Dependency<T, T2 ...> With<T2 ...>(T2 second ...)
// corresponds toDependency<T>.Of(...)
factoriesDependency<T, T2 ...> With<T2 ...>(Dependency<T2 ...> other)
Dependency<T, T2 ...> With<T2 ...>(Func<T2> second ...)
// corresponds toDependency<T>.From(Func<T2> second ...)
factoriesDependency<T, T2 ...> With<T2 ...>(Func<IServiceProvider, T2> second ...)
// corresponds toDependency<T>.From(Func<IServiceProvider, T2> second ...)
factoriesWhat to do
Dependency<...>
rename all theWith<T2 ...>(T2 second ...)
methods toAdd
(as corresponding to theOf
factories).Keep the old
With
methods as wrappers of the newAdd
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.Dependency<...>
rename all theWith<T2 ...>(Dependency<T2 ...> other)
methods toConcat
.Rename the corresponding
InnerWith
toInnerConcat
.Keep the old
With
methods as wrappers of the newInnerConcat
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..NET targets
Remove .NET 7.0 target
The text was updated successfully, but these errors were encountered: