Skip to content

Enhance VSSDK001 code fix to migrate to AsyncPackage more completely #20

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

Merged
merged 3 commits into from
Feb 12, 2018

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Feb 11, 2018

The VSSDK001 code fix now also:

  1. updates the PackageRegistrationAttribute.AllowBackgroundLoading property
  2. Replaces GetService calls that were in the old Initialize override with GetServiceAsync calls in the new InitializeAsync override.

codefix

I also remove a test as a wave of the white flag against the goal of updating all the IServiceContainer.AddService calls in the Initialize method to use the async service container. So many variants of how the syntax might look -- it's possible, but would be a ton of work so I'll wait for feedback to justify doing it.

That test would be awesome to support, but there are so many variants of syntax for AddService that would have to be upgraded, including lambdas, delegates, method groups, etc., that claiming to accomplish it would be a mammoth effort.
@AArnott AArnott added the enhancement New feature or request label Feb 11, 2018
@AArnott AArnott self-assigned this Feb 11, 2018
@codecov-io
Copy link

Codecov Report

Merging #20 into master will increase coverage by 1.17%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
+ Coverage   92.25%   93.43%   +1.17%     
==========================================
  Files           7        7              
  Lines         284      335      +51     
==========================================
+ Hits          262      313      +51     
  Misses         22       22
Impacted Files Coverage Δ
src/Microsoft.VisualStudio.SDK.Analyzers/Types.cs 90.47% <ø> (ø) ⬆️
...Analyzers/VSSDK001DeriveFromAsyncPackageCodeFix.cs 98.57% <100%> (+0.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5aab3b5...ac42ed1. Read the comment docs.

@madskristensen madskristensen merged commit 35ac34d into microsoft:master Feb 12, 2018
@AArnott AArnott deleted the VSSDK001_PackageRegistration branch February 12, 2018 17:10
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

Successfully merging this pull request may close these issues.

3 participants