-
Notifications
You must be signed in to change notification settings - Fork 389
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
Basic example of consuming a code flow #8398
base: main
Are you sure you want to change the base?
Conversation
Create a basic, real-world example of how to hook up to a data flow for launch settings and use it to respond to changes.
// OnLaunchSettingsChangesAsync method, specifying the UnconfiguredProject as the "context" for the purposes of | ||
// error reporting. | ||
_launchSettingsLink = _launchSettingsProvider.SourceBlock | ||
.LinkToAsyncAction(OnLaunchSettingsChangedAsync, _project); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LinkToAsyncAction
is defined in https://github.com/dotnet/project-system/blob/main/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/DataflowUtilities.cs.
This in turn depends on DataflowBlockFactory.CreateActionBlock.
ILaunchSettingsProvider launchSettingsProvider, | ||
// There are multiple implementations of IProjectPropertiesProvider. The Import attribute here tells MEF to give | ||
// us the specific one named "ProjectFile". | ||
[Import(ContractNames.ProjectPropertyProviders.ProjectFile)] IProjectPropertiesProvider projectProperties) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ContractNames.ProjectPropertyProviders.ProjectFile
is defined in https://github.com/dotnet/project-system/blob/main/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/ContractNames.cs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing because of this unit-test |
I would nice to see this sample code in the wiki page https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/28503/Dataflows |
@tmeschter Howdy. What is the status on this? I'm also a bit confused why this is checked in as source code when I believe it is supposed to be an example. Thanks! |
Create a basic, real-world example of how to hook up to a data flow for launch settings and use it to respond to changes.
Microsoft Reviewers: Open in CodeFlow