Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[automated] Merge branch 'release/8.0' => 'main' #50281

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5d4e6d3
Remove reflection from KestrelServer constructor (#50272)
halter73 Aug 23, 2023
3ea1fa3
Update dependencies from https://github.com/dotnet/extensions build 2…
dotnet-maestro[bot] Aug 23, 2023
61852ce
Ensure enhanced nav requests have the correct headers (#50263)
SteveSandersonMS Aug 23, 2023
5ad966e
In SSR, supply HttpContext as cascading value (#50253)
SteveSandersonMS Aug 23, 2023
0e5ea7e
Fix SSR redirections. Fixes #49670 (#50261)
SteveSandersonMS Aug 23, 2023
1f7f738
API review followups (#50181)
SteveSandersonMS Aug 23, 2023
03e7512
Support hot reload for Blazor component endpoints (#50031)
captainsafia Aug 24, 2023
08cde4d
[release/8.0] Update SDK (#50276)
captainsafia Aug 24, 2023
5f081b8
Provide a better error (#50311)
SteveSandersonMS Aug 24, 2023
a0fb1dd
Remove more setup overhead in RDG benchmarks (#50302)
captainsafia Aug 24, 2023
8c7a342
Use polling to watch certificate paths (#50251)
amcasey Aug 24, 2023
b11467e
Cache parsable and bindable type info in RDG (#50326)
captainsafia Aug 24, 2023
9781991
Use absolute URLs for confirmation emails (#50297)
halter73 Aug 25, 2023
8a50cd5
[release/8.0] [Blazor] Close the circuit when all Blazor Server compo…
MackinnonBuck Aug 25, 2023
9a79397
[release/8.0] Update dependencies from dotnet/runtime (#50305)
dotnet-maestro[bot] Aug 25, 2023
43f0d76
Merge branch 'main' into merge/release/8.0-to-main
MackinnonBuck Aug 25, 2023
224b9f7
Update Version.Details.xml
MackinnonBuck Aug 25, 2023
e0e74ad
Update dependencies from https://github.com/dotnet/source-build-refer…
dotnet-maestro[bot] Aug 25, 2023
fcc98f5
Update Microsoft.Identity.Model to 7.0.0-preview3 (#50218)
jennyf19 Aug 25, 2023
0580531
Update Versions.props
MackinnonBuck Aug 25, 2023
2d7eedd
Merge branch 'main' into merge/release/8.0-to-main
wtgodbe Aug 28, 2023
051c94a
Quarantine tests (#50379)
github-actions[bot] Aug 28, 2023
c4d49b4
[release/8.0] Update dependencies from dotnet/runtime (#50350)
dotnet-maestro[bot] Aug 28, 2023
5cf43b2
Merge branch 'release/8.0' into merge/release/8.0-to-main
MackinnonBuck Aug 28, 2023
fc4aa5c
Update Versions.props
MackinnonBuck Aug 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<Project>
<PropertyGroup>
<!-- Disable IsTrimmable on non-DefaultNetCoreTargetFrameworks even if explicitly enabled or else we'll get NETSDK1195 and NETSDK1210 errors -->
<IsTrimmable Condition="'$(TargetFramework)' != '$(DefaultNetCoreTargetFramework)'"></IsTrimmable>
<EnableAOTAnalyzer Condition=" '$(EnableAOTAnalyzer)' == '' ">$([MSBuild]::ValueOrDefault($(IsTrimmable),'false'))</EnableAOTAnalyzer>
<!-- TODO: Remove when analyzer is enabled by default with AOT in SDK. See https://github.com/dotnet/sdk/issues/31284 -->
<EnableSingleFileAnalyzer Condition=" '$(EnableSingleFileAnalyzer)' == '' ">$(EnableAOTAnalyzer)</EnableSingleFileAnalyzer>
Expand Down
4 changes: 3 additions & 1 deletion eng/CodeGen.proj
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
<_RequiresDelayedBuild Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('RequiresDelayedBuild','true')->Distinct())" />
<_SharedFrameworkAndPackageRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'true'))" />
<_SharedFrameworkRef Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp','true')->WithMetadataValue('IsPackable', 'false'))" />
<_TrimmableProject Include="@(_ProjectReferenceProvider->WithMetadataValue('IsTrimmable', 'true'))" />
<_ShippingAssemblyWithDupes Include="@(_ProjectReferenceProvider->WithMetadataValue('IsAspNetCoreApp', 'true'))" />
<_ShippingAssemblyWithDupes Include="@(_ProjectReferenceProvider->WithMetadataValue('IsShippingPackage', 'true'))" />
<_ShippingAssembly Include="@(_ShippingAssemblyWithDupes->Distinct())" />
<!-- _ProjectReferenceProvider is already Distinct() and does not include metadata for each target framework. -->
<!-- If a project is trimmable for even just one of multiple target frameworks, include it in TrimmableProjects.props. -->
<_TrimmableProject Include="@(_ProvidesReferenceOrRequiresDelay->WithMetadataValue('IsTrimmable', 'true')->WithMetadataValue('IsProjectReferenceProvider','true')->Distinct())" />
</ItemGroup>

<PropertyGroup>
Expand Down
284 changes: 142 additions & 142 deletions eng/Version.Details.xml

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions eng/Versions.props

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions eng/test-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
{"testName": {"contains": "HEADERS_Received_SecondRequest_ConnectProtocolReset"}},
{"testName": {"contains": "ClientUsingOldCallWithNewProtocol"}},
{"testName": {"contains": "CertificateChangedOnDisk"}},
{"testName": {"contains": "CertificateChangedOnDisk_Symlink"}},
{"testAssembly": {"contains": "IIS"}},
{"testAssembly": {"contains": "Template"}},
{"failureMessage": {"contains":"(Site is started but no worker process found)"}},
Expand Down
7 changes: 0 additions & 7 deletions eng/tools/GenerateFiles/Directory.Build.props.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,4 @@
<!-- Temporarily hardcoded to true -->
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
</PropertyGroup>

<!-- Ignore warning about RID resolution rules changing in .NET 8 Preview 6 -->
<!-- Needed until https://github.com/ericsink/SQLitePCL.raw/issues/543 is fixed -->
<!-- See https://github.com/dotnet/aspnetcore/pull/48908#issuecomment-1601894643 -->
<ItemGroup>
<RuntimeHostConfigurationOption Include="System.Runtime.Loader.UseRidGraph" Value="true" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"sdk": {
"version": "8.0.100-rc.1.23381.2"
"version": "8.0.100-rc.2.23422.11"
},
"tools": {
"dotnet": "8.0.100-rc.1.23381.2",
"dotnet": "8.0.100-rc.2.23422.11",
"runtimes": {
"dotnet/x86": [
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ public sealed class CascadingParameterAttribute : CascadingParameterAttributeBas
/// <see cref="CascadingValue{T}"/> that supplies a value with a compatible
/// type.
/// </summary>
public override string? Name { get; set; }
public string? Name { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ namespace Microsoft.AspNetCore.Components;
/// </summary>
public abstract class CascadingParameterAttributeBase : Attribute
{
/// <summary>
/// Gets or sets the name for the parameter, which correlates to the name
/// of a cascading value.
/// </summary>
public abstract string? Name { get; set; }

/// <summary>
/// Gets a flag indicating whether the cascading parameter should
/// be supplied only once per component.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.DependencyInjection.Extensions;

namespace Microsoft.Extensions.DependencyInjection;

Expand All @@ -16,11 +17,11 @@ public static class CascadingValueServiceCollectionExtensions
/// </summary>
/// <typeparam name="TValue">The value type.</typeparam>
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
/// <param name="valueFactory">A callback that supplies a fixed value within each service provider scope.</param>
/// <param name="initialValueFactory">A callback that supplies a fixed value within each service provider scope.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
public static IServiceCollection AddCascadingValue<TValue>(
this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> valueFactory)
=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(() => valueFactory(sp), isFixed: true));
this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> initialValueFactory)
=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(() => initialValueFactory(sp), isFixed: true));

/// <summary>
/// Adds a cascading value to the <paramref name="serviceCollection"/>. This is equivalent to having
Expand All @@ -29,11 +30,11 @@ public static IServiceCollection AddCascadingValue<TValue>(
/// <typeparam name="TValue">The value type.</typeparam>
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
/// <param name="name">A name for the cascading value. If set, <see cref="CascadingParameterAttribute"/> can be configured to match based on this name.</param>
/// <param name="valueFactory">A callback that supplies a fixed value within each service provider scope.</param>
/// <param name="initialValueFactory">A callback that supplies a fixed value within each service provider scope.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
public static IServiceCollection AddCascadingValue<TValue>(
this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> valueFactory)
=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(name, () => valueFactory(sp), isFixed: true));
this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> initialValueFactory)
=> serviceCollection.AddScoped<ICascadingValueSupplier>(sp => new CascadingValueSource<TValue>(name, () => initialValueFactory(sp), isFixed: true));

/// <summary>
/// Adds a cascading value to the <paramref name="serviceCollection"/>. This is equivalent to having
Expand All @@ -50,4 +51,59 @@ public static IServiceCollection AddCascadingValue<TValue>(
public static IServiceCollection AddCascadingValue<TValue>(
this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory)
=> serviceCollection.AddScoped<ICascadingValueSupplier>(sourceFactory);

/// <summary>
/// Adds a cascading value to the <paramref name="serviceCollection"/>, if none is already registered
/// with the value type. This is equivalent to having a fixed <see cref="CascadingValue{TValue}"/> at
/// the root of the component hierarchy.
/// </summary>
/// <typeparam name="TValue">The value type.</typeparam>
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
/// <param name="valueFactory">A callback that supplies a fixed value within each service provider scope.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
public static void TryAddCascadingValue<TValue>(
this IServiceCollection serviceCollection, Func<IServiceProvider, TValue> valueFactory)
{
serviceCollection.TryAddEnumerable(
ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>(
sp => new CascadingValueSource<TValue>(() => valueFactory(sp), isFixed: true)));
}

/// <summary>
/// Adds a cascading value to the <paramref name="serviceCollection"/>, if none is already registered
/// with the value type, regardless of the <paramref name="name"/>. This is equivalent to having a fixed
/// <see cref="CascadingValue{TValue}"/> at the root of the component hierarchy.
/// </summary>
/// <typeparam name="TValue">The value type.</typeparam>
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
/// <param name="name">A name for the cascading value. If set, <see cref="CascadingParameterAttribute"/> can be configured to match based on this name.</param>
/// <param name="valueFactory">A callback that supplies a fixed value within each service provider scope.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
public static void TryAddCascadingValue<TValue>(
this IServiceCollection serviceCollection, string name, Func<IServiceProvider, TValue> valueFactory)
{
serviceCollection.TryAddEnumerable(
ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>(
sp => new CascadingValueSource<TValue>(name, () => valueFactory(sp), isFixed: true)));
}

/// <summary>
/// Adds a cascading value to the <paramref name="serviceCollection"/>, if none is already registered
/// with the value type. This is equivalent to having a fixed <see cref="CascadingValue{TValue}"/> at
/// the root of the component hierarchy.
///
/// With this overload, you can supply a <see cref="CascadingValueSource{TValue}"/> which allows you
/// to notify about updates to the value later, causing recipients to re-render. This overload should
/// only be used if you plan to update the value dynamically.
/// </summary>
/// <typeparam name="TValue">The value type.</typeparam>
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
/// <param name="sourceFactory">A callback that supplies a <see cref="CascadingValueSource{TValue}"/> within each service provider scope.</param>
/// <returns>The <see cref="IServiceCollection"/>.</returns>
public static void TryAddCascadingValue<TValue>(
this IServiceCollection serviceCollection, Func<IServiceProvider, CascadingValueSource<TValue>> sourceFactory)
{
serviceCollection.TryAddEnumerable(
ServiceDescriptor.Scoped<ICascadingValueSupplier, CascadingValueSource<TValue>>(sourceFactory));
}
}
10 changes: 5 additions & 5 deletions src/Components/Components/src/CascadingValueSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ public CascadingValueSource(string name, TValue value, bool isFixed) : this(valu
/// <summary>
/// Constructs an instance of <see cref="CascadingValueSource{TValue}"/>.
/// </summary>
/// <param name="valueFactory">A callback that produces the initial value when first required.</param>
/// <param name="initialValueFactory">A callback that produces the initial value when first required.</param>
/// <param name="isFixed">A flag to indicate whether the value is fixed. If false, all receipients will subscribe for update notifications, which you can issue by calling <see cref="NotifyChangedAsync()"/>. These subscriptions come at a performance cost, so if the value will not change, set <paramref name="isFixed"/> to true.</param>
public CascadingValueSource(Func<TValue> valueFactory, bool isFixed) : this(isFixed)
public CascadingValueSource(Func<TValue> initialValueFactory, bool isFixed) : this(isFixed)
{
_initialValueFactory = valueFactory;
_initialValueFactory = initialValueFactory;
}

/// <summary>
/// Constructs an instance of <see cref="CascadingValueSource{TValue}"/>.
/// </summary>
/// <param name="name">A name for the cascading value. If set, <see cref="CascadingParameterAttribute"/> can be configured to match based on this name.</param>
/// <param name="valueFactory">A callback that produces the initial value when first required.</param>
/// <param name="initialValueFactory">A callback that produces the initial value when first required.</param>
/// <param name="isFixed">A flag to indicate whether the value is fixed. If false, all receipients will subscribe for update notifications, which you can issue by calling <see cref="NotifyChangedAsync()"/>. These subscriptions come at a performance cost, so if the value will not change, set <paramref name="isFixed"/> to true.</param>
public CascadingValueSource(string name, Func<TValue> valueFactory, bool isFixed) : this(valueFactory, isFixed)
public CascadingValueSource(string name, Func<TValue> initialValueFactory, bool isFixed) : this(initialValueFactory, isFixed)
{
ArgumentNullException.ThrowIfNull(name);
_name = name;
Expand Down
Loading