4 instantiations of ResourceViewModel
Aspire.Dashboard (1)
ServiceClient\Partials.cs (1)
23
return
new
()
Aspire.Dashboard.Components.Tests (2)
Pages\ResourcesTests.cs (1)
357
return new
ResourceViewModel
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
30
return new
ResourceViewModel
Aspire.Dashboard.Tests (1)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
30
return new
ResourceViewModel
259 references to ResourceViewModel
Aspire.Dashboard (153)
Components\Controls\PropertyValues\ResourceHealthStateValue.razor.cs (1)
22
public required
ResourceViewModel
Resource { get; set; }
Components\Controls\PropertyValues\ResourceNameButtonValue.razor.cs (1)
30
private
ResourceViewModel
? _resource;
Components\Controls\PropertyValues\ResourceNameValue.razor.cs (2)
18
public required
ResourceViewModel
Resource { get; set; }
21
public required Func<
ResourceViewModel
, string> FormatName { get; set; }
Components\Controls\PropertyValues\ResourceStateValue.razor.cs (1)
22
public required
ResourceViewModel
Resource { get; set; }
Components\Controls\ResourceActions.razor.cs (4)
40
public required Func<
ResourceViewModel
, CommandViewModel, bool> IsCommandExecuting { get; set; }
46
public required
ResourceViewModel
Resource { get; set; }
49
public required Func<
ResourceViewModel
, string> GetResourceName { get; set; }
55
public required ConcurrentDictionary<string,
ResourceViewModel
> ResourceByName { get; set; }
Components\Controls\ResourceDetails.razor.cs (10)
21
public required
ResourceViewModel
Resource { get; set; }
24
public required ConcurrentDictionary<string,
ResourceViewModel
> ResourceByName { get; set; }
53
private
ResourceViewModel
? _resource;
161
Parameters = { ["Resource"] = _resource, ["FormatName"] = new Func<
ResourceViewModel
, string>(FormatName) }
209
foreach (
var
match in matches)
211
items.Add(ResourceDetailRelationshipViewModel.Create(match,
ResourceViewModel
.GetResourceName(match, ResourceByName), resourceRelationships));
231
foreach (
var
otherResource in otherResources)
237
items.Add(ResourceDetailRelationshipViewModel.Create(otherResource,
ResourceViewModel
.GetResourceName(otherResource, ResourceByName), resourceRelationships));
296
private string FormatName(
ResourceViewModel
resource)
298
return
ResourceViewModel
.GetResourceName(resource, ResourceByName);
Components\Pages\ConsoleLogs.razor.cs (14)
102
private readonly ConcurrentDictionary<string,
ResourceViewModel
> _resourceByName = new(StringComparers.ResourceName);
196
foreach (
var
resource in snapshot)
207
if (
ResourceViewModel
.TryGetResourceByName(ResourceName, _resourceByName, out
var
selectedResource))
249
void SetSelectedResourceOption(
ResourceViewModel
resource)
438
private string GetResourceName(
ResourceViewModel
resource) =>
ResourceViewModel
.GetResourceName(resource, _resourceByName);
441
ConcurrentDictionary<string,
ResourceViewModel
> resourcesByName,
471
foreach (
var
resource in grouping.Select(g => g.Value).OrderBy(r => r, ResourceViewModelNameComparer.Instance))
491
SelectViewModel<ResourceTypeDetails> ToOption(
ResourceViewModel
resource, bool isReplica, string resourceName)
505
var resourceName =
ResourceViewModel
.GetResourceName(resource, resourcesByName);
655
private async Task OnResourceChanged(ResourceViewModelChangeType changeType,
ResourceViewModel
resource)
791
public required
ResourceViewModel
? SelectedResource { get; set; }
823
ResourceViewModel
? TryGetSingleResource()
Components\Pages\Resources.razor.cs (22)
95
private
ResourceViewModel
? SelectedResource { get; set; }
98
private readonly ConcurrentDictionary<string,
ResourceViewModel
> _resourceByName = new(StringComparers.ResourceName);
126
private bool Filter(
ResourceViewModel
resource)
245
foreach (
var
resource in snapshot)
304
private bool UpdateFromResource(
ResourceViewModel
resource)
317
private bool UpdateFromResource(
ResourceViewModel
resource, Func<string, bool> resourceTypeVisible, Func<string, bool> stateVisible, Func<string, bool> healthStatusVisible)
374
if (resources._resourceByName.TryGetValue(id, out
var
resource))
387
if (resources._resourceByName.TryGetValue(id, out
var
resource))
397
internal IEnumerable<
ResourceViewModel
> GetFilteredResources()
536
if (_resourceByName.TryGetValue(ResourceName, out
var
selectedResource))
570
private async Task ShowContextMenuAsync(
ResourceViewModel
resource, int screenWidth, int screenHeight, int clientX, int clientY)
606
private async Task ShowResourceDetailsAsync(
ResourceViewModel
resource, string? buttonId)
621
var
current = resource;
666
private string GetResourceName(
ResourceViewModel
resource) =>
ResourceViewModel
.GetResourceName(resource, _resourceByName, _showHiddenResources);
668
private bool HasMultipleReplicas(
ResourceViewModel
resource)
691
private string GetRowClass(
ResourceViewModel
resource)
694
private async Task ExecuteResourceCommandAsync(
ResourceViewModel
resource, CommandViewModel command)
699
private static string GetUrlsTooltip(
ResourceViewModel
resource)
753
foreach (
var
resource in resourcesWithChildren)
760
foreach (
var
resource in resourcesWithChildren)
779
private static List<DisplayedUrl> GetDisplayedUrls(
ResourceViewModel
resource)
Components\ResourcesGridColumns\StateColumnDisplay.razor.cs (1)
15
public required
ResourceViewModel
Resource { get; set; }
Components\ResourcesGridColumns\UnreadLogErrorsBadge.razor.cs (2)
17
public required
ResourceViewModel
Resource { get; set; }
30
private (string? resourceName, int unviewedErrorCount) GetUnviewedErrorCount(
ResourceViewModel
resource)
Components\ResourcesGridColumns\UrlsColumnDisplay.razor.cs (1)
14
public required
ResourceViewModel
Resource { get; set; }
Extensions\ResourceViewModelExtensions.cs (10)
10
public static bool IsRunningState(this
ResourceViewModel
resource)
15
public static bool IsFinishedState(this
ResourceViewModel
resource)
20
public static bool IsExitedState(this
ResourceViewModel
resource)
25
public static bool IsStopped(this
ResourceViewModel
resource)
30
public static bool IsUnusableTransitoryState(this
ResourceViewModel
resource)
35
public static bool IsRuntimeUnhealthy(this
ResourceViewModel
resource)
40
public static bool IsNotStarted(this
ResourceViewModel
resource)
45
public static bool IsWaiting(this
ResourceViewModel
resource)
50
public static bool IsUnknownState(this
ResourceViewModel
resource) => resource.KnownState is KnownResourceState.Unknown;
52
public static bool HasNoState(this
ResourceViewModel
resource) => string.IsNullOrEmpty(resource.State);
Model\BrowserLinkOutgoingPeerResolver.cs (1)
22
public bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out
ResourceViewModel
? matchedResource)
Model\CommonMenuItems.cs (1)
18
IEnumerable<
ResourceViewModel
> resources,
Model\DashboardCommandExecutor.cs (4)
35
public async Task ExecuteAsync(
ResourceViewModel
resource, CommandViewModel command, Func<
ResourceViewModel
, string> getResourceName)
87
public async Task ExecuteAsyncCore(
ResourceViewModel
resource, CommandViewModel command, Func<
ResourceViewModel
, string> getResourceName)
Model\IOutgoingPeerResolver.cs (1)
8
bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out
ResourceViewModel
? matchedResourced);
Model\ResourceDetailRelationshipViewModel.cs (2)
8
public required
ResourceViewModel
Resource { get; init; }
18
public static ResourceDetailRelationshipViewModel Create(
ResourceViewModel
resource, string resourceName, IEnumerable<RelationshipViewModel> matches)
Model\ResourceGraph\ResourceGraphMapper.cs (5)
16
public static ResourceDto MapResource(
ResourceViewModel
r, IDictionary<string,
ResourceViewModel
> resourcesByName, IStringLocalizer<Columns> columnsLoc, bool showHiddenResources)
30
foreach (
var
match in matches)
39
var resourceName =
ResourceViewModel
.GetResourceName(r, resourcesByName);
50
DisplayName =
ResourceViewModel
.GetResourceName(r, resourcesByName),
Model\ResourceGridViewModel.cs (3)
11
public required
ResourceViewModel
Resource { get; init; }
36
public static List<ResourceGridViewModel> OrderNestedResources(List<ResourceGridViewModel> initialGridVMs, Func<
ResourceViewModel
, bool> isCollapsed)
58
void AddChildViewModel(
ResourceViewModel
resource, ResourceGridViewModel parent, int depth, bool hidden)
Model\ResourceIconHelpers.cs (1)
15
public static Icon GetIconForResource(
ResourceViewModel
resource, IconSize desiredSize, IconVariant desiredVariant = IconVariant.Filled)
Model\ResourceMenuItems.cs (8)
27
ResourceViewModel
resource,
30
Func<
ResourceViewModel
, string> getResourceName,
36
Func<
ResourceViewModel
, CommandViewModel, bool> isCommandExecuting,
71
private static void AddUrlMenuItems(List<MenuButtonItem> menuItems,
ResourceViewModel
resource, IStringLocalizer<Resources.Resources> loc)
128
private static void AddTelemetryMenuItems(List<MenuButtonItem> menuItems,
ResourceViewModel
resource, NavigationManager navigationManager, TelemetryRepository telemetryRepository, Func<
ResourceViewModel
, string> getResourceName, IStringLocalizer<Resources.Resources> loc)
180
private static void AddCommandMenuItems(List<MenuButtonItem> menuItems,
ResourceViewModel
resource, IStringLocalizer<Resources.Resources> loc, IStringLocalizer<Commands> commandsLoc, EventCallback<CommandViewModel> commandSelected, Func<
ResourceViewModel
, CommandViewModel, bool> isCommandExecuting)
Model\ResourceOutgoingPeerResolver.cs (13)
15
private readonly ConcurrentDictionary<string,
ResourceViewModel
> _resourceByName = new(StringComparers.ResourceName);
34
foreach (
var
resource in snapshot)
51
if (!_resourceByName.TryGetValue(resource.Name, out
var
existingResource) ||
76
private static bool ArePeerRelevantPropertiesEquivalent(
ResourceViewModel
resource1,
ResourceViewModel
resource2)
121
private static bool ArePropertyValuesEquivalent(
ResourceViewModel
resource1,
ResourceViewModel
resource2, string propertyName)
145
public bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out
ResourceViewModel
? matchedResource)
150
internal static bool TryResolvePeerCore(IDictionary<string,
ResourceViewModel
> resources, KeyValuePair<string, string>[] attributes, [NotNullWhen(true)] out string? name, [NotNullWhen(true)] out
ResourceViewModel
? resourceMatch)
185
private static bool TryMatchAgainstResources(string peerAddress, IDictionary<string,
ResourceViewModel
> resources, [NotNullWhen(true)] out string? name, [NotNullWhen(true)] out
ResourceViewModel
? resourceMatch)
193
name =
ResourceViewModel
.GetResourceName(resource, resources);
Model\ResourceSourceViewModel.cs (2)
15
internal static ResourceSourceViewModel? GetSourceViewModel(
ResourceViewModel
resource)
42
static CommandLineInfo? GetCommandLineInfo(
ResourceViewModel
resourceViewModel)
Model\ResourceStateViewModel.cs (4)
23
internal static ResourceStateViewModel GetStateViewModel(
ResourceViewModel
resource, IStringLocalizer<Columns> loc)
31
private static (Icon icon, Color color) GetStateIcon(
ResourceViewModel
resource)
104
internal static string GetResourceStateTooltip(
ResourceViewModel
resource, IStringLocalizer<Columns> loc)
142
private static string GetStateText(
ResourceViewModel
resource, IStringLocalizer<Columns> loc)
Model\ResourceUrlHelpers.cs (1)
11
public static List<DisplayedUrl> GetUrls(
ResourceViewModel
resource, bool includeInternalUrls = false, bool includeNonEndpointUrls = false)
Model\ResourceViewModel.cs (10)
151
public static string GetResourceName(
ResourceViewModel
resource, IDictionary<string,
ResourceViewModel
> allResources, bool showHiddenResources = false)
156
public static string GetResourceName(
ResourceViewModel
resource, IEnumerable<
ResourceViewModel
> allResources, bool showHiddenResources = false)
159
foreach (
var
item in allResources)
181
public static bool TryGetResourceByName(string resourceName, IDictionary<string,
ResourceViewModel
> resourceByName, [NotNullWhen(true)] out
ResourceViewModel
? resource)
199
public sealed class ResourceViewModelNameComparer : IComparer<
ResourceViewModel
>
203
public int Compare(
ResourceViewModel
? x,
ResourceViewModel
? y)
Model\ResourceViewModelExtensions.cs (14)
12
public static bool IsContainer(this
ResourceViewModel
resource)
17
public static bool IsProject(this
ResourceViewModel
resource)
22
public static bool IsExecutable(this
ResourceViewModel
resource, bool allowSubtypes)
37
public static bool TryGetExitCode(this
ResourceViewModel
resource, out int exitCode)
42
public static bool TryGetContainerImage(this
ResourceViewModel
resource, [NotNullWhen(returnValue: true)] out string? containerImage)
47
public static bool TryGetProjectPath(this
ResourceViewModel
resource, [NotNullWhen(returnValue: true)] out string? projectPath)
52
public static bool TryGetExecutablePath(this
ResourceViewModel
resource, [NotNullWhen(returnValue: true)] out string? executablePath)
57
public static bool TryGetExecutableArguments(this
ResourceViewModel
resource, out ImmutableArray<string> arguments)
62
public static bool TryGetAppArgs(this
ResourceViewModel
resource, out ImmutableArray<string> arguments)
67
public static bool TryGetAppArgsSensitivity(this
ResourceViewModel
resource, out ImmutableArray<bool> argParams)
72
private static bool TryGetCustomDataString(this
ResourceViewModel
resource, string key, [NotNullWhen(returnValue: true)] out string? s)
84
private static bool TryGetCustomDataStringArray(this
ResourceViewModel
resource, string key, out ImmutableArray<string> strings)
109
private static bool TryGetCustomDataBoolArray(this
ResourceViewModel
resource, string key, out ImmutableArray<bool> bools)
134
private static bool TryGetCustomDataInt(this
ResourceViewModel
resource, string key, out int i)
Otlp\Storage\TelemetryRepository.cs (3)
1112
var
uninstrumentedPeer = hasUninstrumentedPeer ? ResolveUninstrumentedPeerResource(span, _outgoingPeerResolvers) : null;
1133
private static
ResourceViewModel
? ResolveUninstrumentedPeerResource(OtlpSpan span, IEnumerable<IOutgoingPeerResolver> outgoingPeerResolvers)
1138
if (resolver.TryResolvePeer(span.Attributes, out _, out
var
matchedResourced))
ServiceClient\DashboardClient.cs (6)
45
private readonly Dictionary<string,
ResourceViewModel
> _resourceByName = new(StringComparers.ResourceName);
369
var
viewModel = resource.ToViewModel(_knownPropertyLookup, _logger);
389
var
viewModel = change.Upsert.ToViewModel(_knownPropertyLookup, _logger);
396
if (_resourceByName.Remove(change.Delete.ResourceName, out
var
removed))
553
public
ResourceViewModel
? GetResource(string resourceName)
556
if (_resourceByName.TryGetValue(resourceName, out
var
resource))
ServiceClient\IDashboardClient.cs (3)
47
ResourceViewModel
? GetResource(string resourceName);
71
ImmutableArray<
ResourceViewModel
> InitialState,
76
ResourceViewModel
Resource);
ServiceClient\Partials.cs (2)
19
public
ResourceViewModel
ToViewModel(IKnownPropertyLookup knownPropertyLookup, ILogger logger)
50
throw new InvalidOperationException($@"Error converting resource ""{Name}"" to {nameof(
ResourceViewModel
)}.", ex);
Aspire.Dashboard.Components.Tests (39)
Controls\ResourceDetailsTests.cs (16)
25
var
resource1 = ModelTestHelpers.CreateResource(
38
builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string,
ResourceViewModel
>([new KeyValuePair<string,
ResourceViewModel
> (resource1.Name, resource1)]));
71
var
resource2 = ModelTestHelpers.CreateResource(
109
var
resource1 = ModelTestHelpers.CreateResource(
122
builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string,
ResourceViewModel
>([new KeyValuePair<string,
ResourceViewModel
> (resource1.Name, resource1)]));
155
var
resource2 = ModelTestHelpers.CreateResource(
193
var
resource1 = ModelTestHelpers.CreateResource(
206
builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string,
ResourceViewModel
>([new KeyValuePair<string,
ResourceViewModel
> (resource1.Name, resource1)]));
239
var
resource2 = ModelTestHelpers.CreateResource(
277
var
resource1 = ModelTestHelpers.CreateResource(
290
builder.Add(p => p.ResourceByName, new ConcurrentDictionary<string,
ResourceViewModel
>([new KeyValuePair<string,
ResourceViewModel
> (resource1.Name, resource1)]));
323
var
resource2 = ModelTestHelpers.CreateResource(
Pages\ConsoleLogsTests.cs (13)
48
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
98
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
99
var
testResource2 = ModelTestHelpers.CreateResource(resourceName: "test-resource2", state: KnownResourceState.Running);
180
var
regularResource = ModelTestHelpers.CreateResource(resourceName: "regular-resource", state: KnownResourceState.Running);
181
var
hiddenResource = ModelTestHelpers.CreateResource(resourceName: "hidden-resource", state: KnownResourceState.Running, hidden: true);
287
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
335
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
384
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
437
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
494
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
548
var
testResource = ModelTestHelpers.CreateResource(
612
var
testResource = ModelTestHelpers.CreateResource(
675
var
testResource = ModelTestHelpers.CreateResource(resourceName: "test-resource", state: KnownResourceState.Running);
Pages\ResourcesTests.cs (6)
28
var initialResources = new List<
ResourceViewModel
>
117
var initialResources = new List<
ResourceViewModel
>
179
var initialResources = new List<
ResourceViewModel
>
216
var initialResources = new List<
ResourceViewModel
>
313
var initialResources = new List<
ResourceViewModel
>
355
private static
ResourceViewModel
CreateResource(string name, string type, string? state, ImmutableArray<HealthReportViewModel>? healthReports)
Shared\TestDashboardClient.cs (3)
19
private readonly IList<
ResourceViewModel
>? _initialResources;
33
IList<
ResourceViewModel
>? initialResources = null)
130
public
ResourceViewModel
? GetResource(string resourceName)
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
13
public static
ResourceViewModel
CreateResource(
Aspire.Dashboard.Tests (67)
ConsoleLogsTests\CreateResourceSelectModelsTests.cs (4)
19
var resources = new List<
ResourceViewModel
>
24
var resourcesByName = new ConcurrentDictionary<string,
ResourceViewModel
>(resources.ToDictionary(app => app.Name));
51
var resources = new List<
ResourceViewModel
>
67
var resourcesByName = new ConcurrentDictionary<string,
ResourceViewModel
>(resources.ToDictionary(app => app.Name));
Integration\Playwright\Infrastructure\MockDashboardClient.cs (2)
13
public static readonly
ResourceViewModel
TestResource1 = ModelTestHelpers.CreateResource(
64
public
ResourceViewModel
? GetResource(string resourceName)
Model\ResourceGraphMapperTests.cs (12)
19
var
resource1 = ModelTestHelpers.CreateResource("app1-abcxyc", displayName: "app1", relationships: [new RelationshipViewModel("app2", "Reference")]);
20
var
resource2 = ModelTestHelpers.CreateResource("app2-123456", displayName: "app2", relationships: ImmutableArray<RelationshipViewModel>.Empty);
21
var resources = new Dictionary<string,
ResourceViewModel
>
39
var
resource1 = ModelTestHelpers.CreateResource("app1-abcxyc", displayName: "app1", relationships: [new RelationshipViewModel("app2", "Reference")]);
40
var
resource21 = ModelTestHelpers.CreateResource("app2-123456", displayName: "app2", relationships: ImmutableArray<RelationshipViewModel>.Empty);
41
var
resource22 = ModelTestHelpers.CreateResource("app2-654321", displayName: "app2", relationships: ImmutableArray<RelationshipViewModel>.Empty);
42
var resources = new Dictionary<string,
ResourceViewModel
>
62
var
resource = ModelTestHelpers.CreateResource("app1-abcxyc", displayName: "app1", relationships: ImmutableArray<RelationshipViewModel>.Empty);
63
var resources = new Dictionary<string,
ResourceViewModel
>
79
var
resource1 = ModelTestHelpers.CreateResource("app1-abcxyc", displayName: "app1", relationships: [new RelationshipViewModel("hidden-app", "Reference")]);
80
var
hiddenResource = ModelTestHelpers.CreateResource("hidden-app", displayName: "hidden-app", relationships: ImmutableArray<RelationshipViewModel>.Empty, hidden: true);
81
var resources = new Dictionary<string,
ResourceViewModel
>
Model\ResourceIconHelpersTests.cs (6)
17
var
resource = ModelTestHelpers.CreateResource(iconName: "Database", iconVariant: IconVariant.Filled);
32
var
resource = ModelTestHelpers.CreateResource(iconName: "CloudArrowUp", iconVariant: IconVariant.Regular);
45
var
resource = ModelTestHelpers.CreateResource(resourceType: KnownResourceTypes.Container);
59
var
resource = ModelTestHelpers.CreateResource(resourceType: KnownResourceTypes.Project, iconName: "NonExistentIcon", iconVariant: IconVariant.Filled);
79
var
resource = ModelTestHelpers.CreateResource(resourceType: resourceType);
92
var
resource = ModelTestHelpers.CreateResource(resourceType: "postgres-database");
Model\ResourceMenuItemsTests.cs (3)
25
var
resource = ModelTestHelpers.CreateResource();
55
var
resource = ModelTestHelpers.CreateResource(resourceName: "test-abc");
108
var
resource = ModelTestHelpers.CreateResource(resourceName: "test-abc");
Model\ResourceSourceViewModelTests.cs (1)
39
var
resource = ModelTestHelpers.CreateResource(
Model\ResourceStateViewModelTests.cs (1)
78
var
resource = ModelTestHelpers.CreateResource(
Model\ResourceUrlHelpersTests.cs (1)
12
public static List<DisplayedUrl> GetUrls(
ResourceViewModel
resource, bool includeInternalUrls = false)
Model\ResourceViewModelTests.cs (7)
30
var actualStatus =
ResourceViewModel
.ComputeHealthStatus(reports, state);
50
var
vm = resource.ToViewModel(new MockKnownPropertyLookup(), NullLogger.Instance);
78
var
vm = resource.ToViewModel(new MockKnownPropertyLookup(), NullLogger.Instance);
128
var
viewModel = resource.ToViewModel(new MockKnownPropertyLookup(123, kp), NullLogger.Instance);
170
var
vm = resource.ToViewModel(new MockKnownPropertyLookup(), NullLogger.Instance);
192
var
vm = resource.ToViewModel(new MockKnownPropertyLookup(), NullLogger.Instance);
213
var
vm = resource.ToViewModel(new MockKnownPropertyLookup(), NullLogger.Instance);
ResourceOutgoingPeerResolverTests.cs (24)
17
private static
ResourceViewModel
CreateResource(string name, string? serviceAddress = null, int? servicePort = null, string? displayName = null, KnownResourceState? state = null)
30
var resources = new Dictionary<string,
ResourceViewModel
>
43
var resources = new Dictionary<string,
ResourceViewModel
>
56
var resources = new Dictionary<string,
ResourceViewModel
>
69
var resources = new Dictionary<string,
ResourceViewModel
>
83
var resources = new Dictionary<string,
ResourceViewModel
>
97
var resources = new Dictionary<string,
ResourceViewModel
>
111
var resources = new Dictionary<string,
ResourceViewModel
>
190
var resources = new Dictionary<string,
ResourceViewModel
>
204
var resources = new Dictionary<string,
ResourceViewModel
>
218
private static bool TryResolvePeerName(IDictionary<string,
ResourceViewModel
> resources, KeyValuePair<string, string>[] attributes, out string? peerName)
228
var resources = new Dictionary<string,
ResourceViewModel
>
243
var resources = new Dictionary<string,
ResourceViewModel
>
257
var resources = new Dictionary<string,
ResourceViewModel
>
272
var resources = new Dictionary<string,
ResourceViewModel
>
285
var resources = new Dictionary<string,
ResourceViewModel
>
299
var resources = new Dictionary<string,
ResourceViewModel
>
314
var resources = new Dictionary<string,
ResourceViewModel
>
324
private static
ResourceViewModel
CreateResourceWithConnectionString(string name, string connectionString)
342
private static
ResourceViewModel
CreateResourceWithParameterValue(string name, string value)
364
var resources = new Dictionary<string,
ResourceViewModel
>
379
var resources = new Dictionary<string,
ResourceViewModel
>
396
var resources = new Dictionary<string,
ResourceViewModel
>
415
public
ResourceViewModel
? GetResource(string resourceName) => throw new NotImplementedException();
TelemetryRepositoryTests\TestOutgoingPeerResolver.cs (3)
11
private readonly Func<KeyValuePair<string, string>[], (string? Name,
ResourceViewModel
? Resource)>? _onResolve;
14
public TestOutgoingPeerResolver(Func<KeyValuePair<string, string>[], (string? Name,
ResourceViewModel
? Resource)>? onResolve = null)
38
public bool TryResolvePeer(KeyValuePair<string, string>[] attributes, out string? name, out
ResourceViewModel
? matchedResourced)
TelemetryRepositoryTests\TraceTests.cs (2)
2014
var
matchedResourced = ModelTestHelpers.CreateResource(resourceName: "TestPeer");
2129
var
resource = ModelTestHelpers.CreateResource(resourceName: "test-abc-def", displayName: "test");
tests\Shared\DashboardModel\ModelTestHelpers.cs (1)
13
public static
ResourceViewModel
CreateResource(