Dev zhi project provider async service - #2163
Conversation
|
|
||
| [ImportingConstructor] | ||
| internal DefaultVSCredentialServiceProvider(Lazy<INuGetUILogger> outputConsoleLogger) | ||
| : this(AsyncServiceProvider.GlobalProvider, outputConsoleLogger) |
There was a problem hiding this comment.
what is this AsyncServiceProvider.GlobalProvider and is it MEF component? how is this being resolved?
There was a problem hiding this comment.
it's not a MEF component, it's a static property which returns AsyncServiceProvider
There was a problem hiding this comment.
if it's a static property then why it's part of MEF constructor?
There was a problem hiding this comment.
it's not in the MEF constructor, it's passed to this() after MEF constructing done.
| IServiceProvider serviceProvider, | ||
| Lazy<INuGetUILogger> outputConsoleLogger | ||
| IAsyncServiceProvider asyncServiceProvider, | ||
| Lazy<INuGetUILogger> outputConsoleLogger |
There was a problem hiding this comment.
is this still needed? are we using it in tests?
There was a problem hiding this comment.
not really needed now, just keep this pattern, in case we need to pass different AsyncServiceProvider in the future.
| public NuGet.Configuration.ICredentialService GetCredentialService() | ||
| public async Task<NuGet.Configuration.ICredentialService> GetCredentialServiceAsync() | ||
| { | ||
| ThreadHelper.ThrowIfNotOnUIThread(); |
There was a problem hiding this comment.
does it still need to be on UI thread?
There was a problem hiding this comment.
it should be ok on worker thread, I can remove this
| threadingService) | ||
| { } | ||
|
|
||
| public LegacyPackageReferenceProjectProvider( |
There was a problem hiding this comment.
same as above do we still need this constructor?
| { | ||
| private readonly IVsProjectThreadingService _threadingService; | ||
| private readonly Lazy<IComponentModel> _componentModel; | ||
| private readonly AsyncLazy<IComponentModel> _componentModel; |
0ece978 to
0e2fe42
Compare
38b0cec to
743acaf
Compare
using AsyncServiceProvider in VSCredentialServiceProvider and all ProjectProvider.
NuGet/Home#6771