Skip to content
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

Move component model code to common location for all AbstractPackages #58397

Merged
merged 9 commits into from
Dec 18, 2021

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

using Microsoft.VisualStudio.Shell;
using Task = System.Threading.Tasks.Task;

namespace Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
{
internal abstract class AbstractPackage : AsyncPackage
{
private IComponentModel _componentModel_doNotAccessDirectly;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 Not a huge fan of _doNotAccessDirectly here... but hopefully this can be removed once we can have partial-auto-properties.

…actPackage.cs

Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>

protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
{
await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this still need to call the base.InitiaizeAsync too?

using Microsoft.VisualStudio.Shell;
using Task = System.Threading.Tasks.Task;

namespace Microsoft.VisualStudio.LanguageServices.Implementation.LanguageService
{
internal abstract class AbstractPackage : AsyncPackage
{
private IComponentModel _componentModel_doNotAccessDirectly;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to at least #nullable enable this bit and make the field nullable?

@CyrusNajmabadi CyrusNajmabadi merged commit 785ce8c into dotnet:main Dec 18, 2021
@ghost ghost added this to the Next milestone Dec 18, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the shareComponentModel branch December 18, 2021 16:03
@Cosifne Cosifne modified the milestones: Next, 17.1.P3 Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants