30 references to TextVisualizerDialog
Aspire.Dashboard (2)
Components\Controls\GridValue.razor.cs (1)
148
await
TextVisualizerDialog
.OpenDialogAsync(ViewportInformation, DialogService, ValueDescription, ValueToVisualize ?? Value ?? string.Empty);
Components\Controls\StructuredLogActions.razor.cs (1)
57
await
TextVisualizerDialog
.OpenDialogAsync(ViewportInformation, DialogService, header, LogEntry.Message);
Aspire.Dashboard.Components.Tests (28)
Controls\TextVisualizerDialogTests.cs (28)
43
await dialogService.ShowDialogAsync<
TextVisualizerDialog
>(new TextVisualizerDialogViewModel(rawJson, string.Empty), []);
45
var
instance = cut.FindComponent<
TextVisualizerDialog
>().Instance;
48
Assert.Equal(
TextVisualizerDialog
.JsonFormat, instance.FormatKind);
49
Assert.Equal([
TextVisualizerDialog
.JsonFormat,
TextVisualizerDialog
.PlaintextFormat], instance.EnabledOptions.ToImmutableSortedSet());
65
await dialogService.ShowDialogAsync<
TextVisualizerDialog
>(new TextVisualizerDialogViewModel(rawXml, string.Empty), []);
67
var
instance = cut.FindComponent<
TextVisualizerDialog
>().Instance;
69
Assert.Equal(
TextVisualizerDialog
.XmlFormat, instance.FormatKind);
71
Assert.Equal([
TextVisualizerDialog
.PlaintextFormat,
TextVisualizerDialog
.XmlFormat], instance.EnabledOptions.ToImmutableSortedSet());
74
instance.ChangeFormat(
TextVisualizerDialog
.PlaintextFormat, rawXml);
76
Assert.Equal(
TextVisualizerDialog
.PlaintextFormat, instance.FormatKind);
91
await dialogService.ShowDialogAsync<
TextVisualizerDialog
>(new TextVisualizerDialogViewModel(rawXml, string.Empty), []);
93
var
instance = cut.FindComponent<
TextVisualizerDialog
>().Instance;
95
Assert.Equal(
TextVisualizerDialog
.XmlFormat, instance.FormatKind);
97
Assert.Equal([
TextVisualizerDialog
.PlaintextFormat,
TextVisualizerDialog
.XmlFormat], instance.EnabledOptions.ToImmutableSortedSet());
106
await dialogService.ShowDialogAsync<
TextVisualizerDialog
>(new TextVisualizerDialogViewModel(rawText, string.Empty), []);
108
var
instance = cut.FindComponent<
TextVisualizerDialog
>().Instance;
110
Assert.Equal(
TextVisualizerDialog
.PlaintextFormat, instance.FormatKind);
112
Assert.Equal([
TextVisualizerDialog
.PlaintextFormat], instance.EnabledOptions.ToImmutableSortedSet());
122
await dialogService.ShowDialogAsync<
TextVisualizerDialog
>(new TextVisualizerDialogViewModel(xml, string.Empty), []);
127
var instance = cut.FindComponent<
TextVisualizerDialog
>();
139
await dialogService.ShowDialogAsync<
TextVisualizerDialog
>(new TextVisualizerDialogViewModel(xml, string.Empty), []);