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
Currently, Jab uses runtime checks to find the correct service factory inside GetService<T>, this could be done by the Jab in compile time improving the runtime performance.
So instead of this code to all new instances when have depencies:
public T GetService<T>()=>thisisIServiceProvider<T> provider ? provider.GetService():throwCreateServiceNotFoundException<T>();
Jab.Performance.Basic.Mixed.IMix1 IServiceProvider<Jab.Performance.Basic.Mixed.IMix1>.GetService(){
Jab.Performance.Basic.Mixed.Mix1 service=new Jab.Performance.Basic.Mixed.Mix1(this.GetService<Jab.Performance.Basic.Singleton.ISingleton1>(),this.GetService<Jab.Performance.Basic.Transient.ITransient1>());
TryAddDisposable(service);returnservice;}
Update this code to avoid the this is IServiceProvider<T> runtime check.
Currently, Jab uses runtime checks to find the correct service factory inside
GetService<T>
, this could be done by the Jab in compile time improving the runtime performance.So instead of this code to all new instances when have depencies:
Update this code to avoid the
this is IServiceProvider<T>
runtime check.See: #168 (comment)
The text was updated successfully, but these errors were encountered: