Skip to content

Commit 77e64b4

Browse files
Copilotilonatommy
andcommitted
Move RespectRequiredConstructorParametersDefault to Directory.Build.props and restore original ResourceAsset API
Co-authored-by: ilonatommy <[email protected]>
1 parent 94abbe4 commit 77e64b4

File tree

10 files changed

+13
-32
lines changed

10 files changed

+13
-32
lines changed

src/Components/Components/src/PublicAPI.Shipped.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType.Region = 5 -> Mic
417417
Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType.Text = 2 -> Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrameType
418418
Microsoft.AspNetCore.Components.ResourceAsset
419419
Microsoft.AspNetCore.Components.ResourceAsset.Properties.get -> System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Components.ResourceAssetProperty!>?
420+
Microsoft.AspNetCore.Components.ResourceAsset.ResourceAsset(string! url, System.Collections.Generic.IReadOnlyList<Microsoft.AspNetCore.Components.ResourceAssetProperty!>? properties) -> void
420421
Microsoft.AspNetCore.Components.ResourceAsset.Url.get -> string!
421422
Microsoft.AspNetCore.Components.ResourceAssetCollection
422423
Microsoft.AspNetCore.Components.ResourceAssetCollection.IsContentSpecificUrl(string! path) -> bool

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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ 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) { }
1722
/// <summary>
1823
/// Gets the URL that identifies this resource.
1924
/// </summary>

src/Components/test/testassets/BasicTestApp/BasicTestApp.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616

1717
</PropertyGroup>
1818

19-
<ItemGroup>
20-
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
21-
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
22-
</ItemGroup>
23-
2419
<PropertyGroup Condition="'$(TestTrimmedOrMultithreadingApps)' == 'true'">
2520
<!-- Avoid spending time brotli compression publish output.-->
2621
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>

src/Components/test/testassets/Components.TestServer/Components.TestServer.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
<InterceptorsNamespaces>$(InterceptorsNamespaces);Microsoft.AspNetCore.Http.Validation.Generated;Microsoft.Extensions.Validation.Generated</InterceptorsNamespaces>
1414
</PropertyGroup>
1515

16-
<ItemGroup>
17-
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
18-
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
19-
</ItemGroup>
20-
2116
<ItemGroup>
2217
<ProjectReference Include="$(RepoRoot)/src/Validation/gen/Microsoft.Extensions.Validation.ValidationsGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
2318
</ItemGroup>

src/Components/test/testassets/Components.WasmMinimal/Components.WasmMinimal.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
99
</PropertyGroup>
1010

11-
<ItemGroup>
12-
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
13-
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
14-
</ItemGroup>
15-
1611
<ItemGroup>
1712
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly" />
1813
<Reference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" />

src/Components/test/testassets/Components.WasmRemoteAuthentication/Components.WasmRemoteAuthentication.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
<StaticWebAssetBasePath>WasmRemoteAuthentication</StaticWebAssetBasePath>
88
</PropertyGroup>
99

10-
<ItemGroup>
11-
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
12-
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
13-
</ItemGroup>
14-
1510
<PropertyGroup Condition="'$(TestTrimmedOrMultithreadingApps)' == 'true'">
1611
<!-- Avoid spending time brotli compression publish output.-->
1712
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>

src/Components/test/testassets/ComponentsApp.Server/ComponentsApp.Server.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
<TargetFramework>$(DefaultNetCoreTargetFramework)</TargetFramework>
55
</PropertyGroup>
66

7-
<ItemGroup>
8-
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
9-
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
10-
</ItemGroup>
11-
127
<ItemGroup>
138
<Reference Include="Microsoft.AspNetCore" />
149
<Reference Include="Microsoft.AspNetCore.Components.Server" />

src/Components/test/testassets/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,9 @@
2525
<PropertyGroup>
2626
<BlazorCacheBootResources>false</BlazorCacheBootResources>
2727
</PropertyGroup>
28+
29+
<ItemGroup>
30+
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
31+
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
32+
</ItemGroup>
2833
</Project>

src/Components/test/testassets/GlobalizationWasmApp/GlobalizationWasmApp.csproj

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99
<GenerateResxSource>false</GenerateResxSource>
1010
</PropertyGroup>
1111

12-
<ItemGroup>
13-
<!-- Enable RespectRequiredConstructorParametersDefault to test compatibility -->
14-
<RuntimeHostConfigurationOption Include="System.Text.Json.Serialization.RespectRequiredConstructorParametersDefault" Value="true" />
15-
</ItemGroup>
16-
1712
<PropertyGroup Condition="'$(TestTrimmedOrMultithreadingApps)' == 'true'">
1813
<!-- Avoid spending time brotli compression publish output.-->
1914
<_BlazorBrotliCompressionLevel>NoCompression</_BlazorBrotliCompressionLevel>

0 commit comments

Comments
 (0)