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
{{ message }}
Repository navigation
Depricate ExportInstance(delegate) methods in favor of ExportFactory<...> methods #89
With the introduction of the ExportFactory method the ExportInstance(delegate) methods have become obsolete. As well as being obsolete the behavior is not consistent with how ExportInstance<T>(T value) and leads to confusion as seen in issue #86. With this in mind I'm going to mark the methods as obsolete in 6.2 and plan to remove them at some point later for a major version number release.
@ipjohnson How about adding an "ExportFuncWithContext" extension method (that maps to ExportFunc<IExportLocatorScope, StaticInjectionContext, IInjectionContext,T>) to IExportRegistrationBlock?
I think it would make easier the transition from the obsolete ExportInstance method when you just want to do a context-base activation, and would provide design-time support for tools such as Resharper to suggest you the signature of the delegate.
Activity
marking ExportInstance as Obsolete for issue #89
darkcamper commentedon May 25, 2017
@ipjohnson How about adding an "ExportFuncWithContext" extension method (that maps to ExportFunc<IExportLocatorScope, StaticInjectionContext, IInjectionContext,T>) to IExportRegistrationBlock?
I think it would make easier the transition from the obsolete ExportInstance method when you just want to do a context-base activation, and would provide design-time support for tools such as Resharper to suggest you the signature of the delegate.
ipjohnson commentedon May 25, 2017
@darkcamper sounds like a good idea, something like this?
darkcamper commentedon May 25, 2017
@ipjohnson Yeah! That's exactly what I had in mind.
adding ExportFuncWithContext for issue #89