diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index c8c2858e727..c4337eea9ce 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,167 +1,167 @@ - + https://github.com/dotnet/winforms - d02c89d400d27ac493ed78d1e307c3d4aaaab5d5 + f432c76433d916d7c9762e50e6abf59d9ec41f2c - + https://github.com/dotnet/winforms - d02c89d400d27ac493ed78d1e307c3d4aaaab5d5 + f432c76433d916d7c9762e50e6abf59d9ec41f2c - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int 726c62718af03d61fba006a54ad8d87c8abc64de - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/runtime - fe3d5b5f7039e9f38f022dac77aeb6f01025b19d + 12afdedd8050847aa90473e254fa782f54360990 - + https://github.com/dotnet/winforms - d02c89d400d27ac493ed78d1e307c3d4aaaab5d5 + f432c76433d916d7c9762e50e6abf59d9ec41f2c diff --git a/eng/Versions.props b/eng/Versions.props index eb75ad065b2..2968a7f8ec7 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -21,28 +21,28 @@ - 10.0.0-alpha.1.24578.1 + 10.0.0-alpha.1.24603.5 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24578.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.5 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 4.6.0-preview4.19176.11 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 - 10.0.0-alpha.1.24577.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 + 10.0.0-alpha.1.24603.1 6.0.0 diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs index 1f8ca58837a..98d29783864 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Nrbf/SerializationRecordExtensions.cs @@ -178,22 +178,30 @@ static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? valu || !classInfo.HasMember("_items") || !classInfo.HasMember("_size") || classInfo.GetRawValue("_size") is not int size - || classInfo.GetRawValue("_items") is not SZArrayRecord arrayRecord + || classInfo.GetRawValue("_items") is not SZArrayRecord arrayRecord || size > arrayRecord.Length) { return false; } ArrayList arrayList = new(size); - object?[] array = arrayRecord.GetArray(); + SerializationRecord?[] array = arrayRecord.GetArray(); for (int i = 0; i < size; i++) { - if (array[i] is SerializationRecord) + SerializationRecord? elementRecord = array[i]; + if (elementRecord is null) { + arrayList.Add(null); + } + else if (elementRecord is PrimitiveTypeRecord primitiveTypeRecord) + { + arrayList.Add(primitiveTypeRecord.Value); + } + else + { + // It was a complex type (represented as a ClassRecord or an ArrayRecord) return false; } - - arrayList.Add(array[i]); } value = arrayList; @@ -259,27 +267,39 @@ static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hash || !classInfo.HasMember("Values") // Note that hashtables with custom comparers and/or hash code providers will have non null Comparer || classInfo.GetSerializationRecord("Comparer") is not null - || classInfo.GetSerializationRecord("Keys") is not SZArrayRecord keysRecord - || classInfo.GetSerializationRecord("Values") is not SZArrayRecord valuesRecord + || classInfo.GetSerializationRecord("Keys") is not SZArrayRecord keysRecord + || classInfo.GetSerializationRecord("Values") is not SZArrayRecord valuesRecord || keysRecord.Length != valuesRecord.Length) { return false; } Hashtable temp = new(keysRecord.Length); - object?[] keys = keysRecord.GetArray(); - object?[] values = valuesRecord.GetArray(); + SerializationRecord?[] keys = keysRecord.GetArray(); + SerializationRecord?[] values = valuesRecord.GetArray(); for (int i = 0; i < keys.Length; i++) { - object? key = keys[i]; - object? value = values[i]; + SerializationRecord? key = keys[i]; + SerializationRecord? value = values[i]; - if (key is null or SerializationRecord || value is SerializationRecord) + if (key is null || key is not PrimitiveTypeRecord primitiveKey) { return false; } - temp[key] = value; + if (value is null) + { + temp[primitiveKey.Value] = null; // null values are allowed + } + else if (value is PrimitiveTypeRecord primitiveValue) + { + temp[primitiveKey.Value] = primitiveValue.Value; + } + else + { + // It was a complex type (represented as a ClassRecord or an ArrayRecord) + return false; + } } hashtable = temp;