Skip to content

Commit 3e91573

Browse files
committed
use a separate constructor, fix build
1 parent 551e187 commit 3e91573

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Components/Components/src/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#nullable enable
2-
Microsoft.AspNetCore.Components.ResourceAsset.ResourceAsset(string! url, System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Components.ResourceAssetProperty!>? properties = null) -> void
2+
Microsoft.AspNetCore.Components.ResourceAsset.ResourceAsset(string! url) -> void
33
Microsoft.AspNetCore.Components.Routing.Router.NotFoundPage.get -> System.Type!
44
Microsoft.AspNetCore.Components.Routing.Router.NotFoundPage.set -> void
55
Microsoft.AspNetCore.Components.Infrastructure.ComponentsMetricsServiceCollectionExtensions

src/Components/Components/src/ResourceAsset.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ namespace Microsoft.AspNetCore.Components;
1212
/// <param name="url">The URL of the resource.</param>
1313
/// <param name="properties">The properties associated to this resource.</param>
1414
[DebuggerDisplay($"{{{nameof(GetDebuggerDisplay)}(),nq}}")]
15-
public sealed class ResourceAsset(string url, IReadOnlyList<ResourceAssetProperty>? properties = null)
15+
public sealed class ResourceAsset(string url, IReadOnlyList<ResourceAssetProperty>? properties)
1616
{
17+
/// <summary>
18+
/// Initializes a new instance of <see cref="ResourceAsset"/>.
19+
/// </summary>
20+
/// <param name="url">The URL of the resource.</param>
21+
public ResourceAsset(string url) : this(url, null) { }
22+
1723
/// <summary>
1824
/// Gets the URL that identifies this resource.
1925
/// </summary>

0 commit comments

Comments
 (0)