Extract out common QI code for Xaml to use.#52096
Conversation
|
@mgoertz-msft You would now call QuickInfoUtilities.CreateQuickInfoItemAsync which shares the real code with our QI impl. You can then take the QuickInfoItem returned and effectively do:
|
|
Thanks, I was wondering how I would get the TaggedText out of the QuickInfoItem now. :) |
|
|
||
| var showWarningGlyph = supportedPlatforms != null && supportedPlatforms.HasValidAndInvalidProjects(); | ||
|
|
||
| var symbols = tokenInformation.Symbols; |
There was a problem hiding this comment.
logic that cares abotu 'token' or 'tokenInformation' stayed here. The values we need from those are then just passed into the common helper which was moved to a Utilities class.
| var sections = ImmutableArray.CreateBuilder<QuickInfoSection>(initialCapacity: groups.Count); | ||
|
|
||
| var symbol = tokenInformation.Symbols.First(); | ||
| if (tokenInformation.ShowAwaitReturn) |
There was a problem hiding this comment.
this logic was moved, effectively unchanged. we just now don't access token/tokenInformation/etc. anymore, but we use the values passed in.
| SupportedPlatformData? supportedPlatforms = null, | ||
| bool showAwaitReturn = false, | ||
| NullableFlowState flowState = NullableFlowState.None, | ||
| CancellationToken cancellationToken = default) |
There was a problem hiding this comment.
@mgoertz-msft you can ignore the supportedPlatform/showAwaitReturn/flowState as i imagine you don't care about them.
| SupportedPlatformData? supportedPlatforms = null, | ||
| bool showAwaitReturn = false, | ||
| NullableFlowState flowState = NullableFlowState.None, | ||
| CancellationToken cancellationToken = default) |
There was a problem hiding this comment.
should cancellation token just be required?
No description provided.