Skip to content

Commit 099783a

Browse files
authored
Update SDK to 23556.1 (#51907)
* Update SDK to 23556.1 Regular BuildOps update * Suppress IL2072 with pragmas ...now that it's reported by a roslyn analyzer. Analogous to 533a66c for IL2111.
1 parent f884a7b commit 099783a

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

global.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"sdk": {
3-
"version": "9.0.100-alpha.1.23530.11"
3+
"version": "9.0.100-alpha.1.23556.1"
44
},
55
"tools": {
6-
"dotnet": "9.0.100-alpha.1.23530.11",
6+
"dotnet": "9.0.100-alpha.1.23556.1",
77
"runtimes": {
88
"dotnet/x86": [
99
"$(MicrosoftNETCoreBrowserDebugHostTransportVersion)"

src/Components/Components/src/CascadingParameterState.cs

+5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ public CascadingParameterState(in CascadingParameterInfo parameterInfo, ICascadi
2828
public static IReadOnlyList<CascadingParameterState> FindCascadingParameters(ComponentState componentState, out bool hasSingleDeliveryParameters)
2929
{
3030
var componentType = componentState.Component.GetType();
31+
32+
// Suppressed with "pragma warning disable" so ILLink Roslyn Anayzer doesn't report the warning.
33+
#pragma warning disable IL2072 // 'componentType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.CascadingParameterState.GetCascadingParameterInfos(Type)'.
3134
var infos = GetCascadingParameterInfos(componentType);
35+
#pragma warning restore IL2072 // 'componentType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.CascadingParameterState.GetCascadingParameterInfos(Type)'.
36+
3237
hasSingleDeliveryParameters = false;
3338

3439
// For components known not to have any cascading parameters, bail out early

src/Components/Components/src/ComponentFactory.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,11 @@ public IComponent InstantiateComponent(IServiceProvider serviceProvider, [Dynami
8989

9090
private static void PerformPropertyInjection(IServiceProvider serviceProvider, IComponent instance)
9191
{
92+
// Suppressed with "pragma warning disable" so ILLink Roslyn Anayzer doesn't report the warning.
93+
#pragma warning disable IL2072 // 'componentType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.ComponentFactory.GetComponentTypeInfo(Type)'.
9294
var componentTypeInfo = GetComponentTypeInfo(instance.GetType());
95+
#pragma warning restore IL2072 // 'componentType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.ComponentFactory.GetComponentTypeInfo(Type)'.
96+
9397
componentTypeInfo.PerformPropertyInjection(serviceProvider, instance);
9498
}
9599

@@ -168,7 +172,7 @@ public ComponentTypeInfoCacheEntry(
168172
}
169173

170174
public void Deconstruct(
171-
out IComponentRenderMode? componentTypeRenderMode,
175+
out IComponentRenderMode? componentTypeRenderMode,
172176
out Action<IServiceProvider, IComponent> performPropertyInjection)
173177
{
174178
componentTypeRenderMode = ComponentTypeRenderMode;

src/Components/Components/src/Reflection/ComponentProperties.cs

+8
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ public static void SetProperties(in ParameterView parameters, object target)
2828
var targetType = target.GetType();
2929
if (!_cachedWritersByType.TryGetValue(targetType, out var writers))
3030
{
31+
// Suppressed with "pragma warning disable" so ILLink Roslyn Anayzer doesn't report the warning.
32+
#pragma warning disable IL2072 // 'targetType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.Reflection.ComponentProperties.WritersForType.WritersForType(Type)'.
3133
writers = new WritersForType(targetType);
34+
#pragma warning restore IL2072 // 'targetType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.Reflection.ComponentProperties.WritersForType.WritersForType(Type)'.
3235
_cachedWritersByType[targetType] = writers;
3336
}
3437

@@ -39,10 +42,15 @@ public static void SetProperties(in ParameterView parameters, object target)
3942
foreach (var parameter in parameters)
4043
{
4144
var parameterName = parameter.Name;
45+
4246
if (!writers.TryGetValue(parameterName, out var writer))
4347
{
48+
// Suppressed with "pragma warning disable" so ILLink Roslyn Anayzer doesn't report the warning.
49+
#pragma warning disable IL2072 // 'targetType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.Reflection.ComponentProperties.ThrowForUnknownIncomingParameterName(Type, String)'.
4450
// Case 1: There is nowhere to put this value.
4551
ThrowForUnknownIncomingParameterName(targetType, parameterName);
52+
#pragma warning restore IL2072 // 'targetType' argument does not satisfy 'DynamicallyAccessedMemberTypes.All' in call to 'Microsoft.AspNetCore.Components.Reflection.ComponentProperties.ThrowForUnknownIncomingParameterName(Type, String)'.
53+
4654
throw null; // Unreachable
4755
}
4856
else if (!writer.AcceptsDirectParameters && !parameter.Cascading)

0 commit comments

Comments
 (0)