From 5e5deebfe533563c99091b52461d627350ebe751 Mon Sep 17 00:00:00 2001 From: Anjali Date: Tue, 5 Dec 2023 13:16:07 +0530 Subject: [PATCH 1/3] Addressed invalid cast Exception --- .../PresentationFramework/PresentationFramework.cs | 2 +- .../System/Windows/Markup/XmlAttributeProperties.cs | 4 ++-- .../src/PresentationFramework/ref/PresentationFramework.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs b/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs index cd816c5b6c8..38f05e69e5e 100644 --- a/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs +++ b/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs @@ -11485,7 +11485,7 @@ internal XmlAttributeProperties() { } public static readonly System.Windows.DependencyProperty XmlSpaceProperty; [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] [System.Windows.AttachedPropertyBrowsableForTypeAttribute(typeof(System.Windows.DependencyObject))] - public static string GetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject) { throw null; } + public static System.Collections.Hashtable GetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject) { throw null; } [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] [System.Windows.AttachedPropertyBrowsableForTypeAttribute(typeof(System.Windows.DependencyObject))] [System.Windows.Markup.DesignerSerializationOptionsAttribute(System.Windows.Markup.DesignerSerializationOptions.SerializeAsAttribute)] diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs index 6980a358e38..b0b45ececbe 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs @@ -296,14 +296,14 @@ public static void SetXmlnsDefinition(DependencyObject dependencyObject, string /// [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [AttachedPropertyBrowsableForType(typeof(DependencyObject))] - public static string GetXmlNamespaceMaps(DependencyObject dependencyObject) + public static System.Collections.Hashtable GetXmlNamespaceMaps(DependencyObject dependencyObject) { if (dependencyObject == null) { throw new ArgumentNullException( "dependencyObject" ); } - return (string)dependencyObject.GetValue(XmlNamespaceMapsProperty); + return (System.Collections.Hashtable)dependencyObject.GetValue(XmlNamespaceMapsProperty); } /// diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs index 7a77e13c7ba..ab9eaf467e9 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs @@ -11505,7 +11505,7 @@ internal XmlAttributeProperties() { } public static readonly System.Windows.DependencyProperty XmlSpaceProperty; [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] [System.Windows.AttachedPropertyBrowsableForTypeAttribute(typeof(System.Windows.DependencyObject))] - public static string GetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject) { throw null; } + public static System.Collections.Hashtable GetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject) { throw null; } [System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)] [System.Windows.AttachedPropertyBrowsableForTypeAttribute(typeof(System.Windows.DependencyObject))] [System.Windows.Markup.DesignerSerializationOptionsAttribute(System.Windows.Markup.DesignerSerializationOptions.SerializeAsAttribute)] From 95d399d7860cc56d0619e7217f2367e10b3c83b7 Mon Sep 17 00:00:00 2001 From: Anjali Sheel Date: Wed, 6 Dec 2023 21:54:03 +0530 Subject: [PATCH 2/3] Changed datatype for SetXmlNamespaceMaps --- .../PresentationFramework/PresentationFramework.cs | 2 +- .../System/Windows/Markup/XmlAttributeProperties.cs | 6 +++--- .../src/PresentationFramework/ref/PresentationFramework.cs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs b/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs index 38f05e69e5e..78efe1b3984 100644 --- a/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs +++ b/src/Microsoft.DotNet.Wpf/cycle-breakers/PresentationFramework/PresentationFramework.cs @@ -11496,7 +11496,7 @@ internal XmlAttributeProperties() { } [System.Windows.AttachedPropertyBrowsableForTypeAttribute(typeof(System.Windows.DependencyObject))] [System.Windows.Markup.DesignerSerializationOptionsAttribute(System.Windows.Markup.DesignerSerializationOptions.SerializeAsAttribute)] public static string GetXmlSpace(System.Windows.DependencyObject dependencyObject) { throw null; } - public static void SetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject, string value) { } + public static void SetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject, System.Collections.Hashtable value) { } public static void SetXmlnsDefinition(System.Windows.DependencyObject dependencyObject, string value) { } public static void SetXmlnsDictionary(System.Windows.DependencyObject dependencyObject, System.Windows.Markup.XmlnsDictionary value) { } public static void SetXmlSpace(System.Windows.DependencyObject dependencyObject, string value) { } diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs index b0b45ececbe..1bdf1ad81af 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XmlAttributeProperties.cs @@ -296,14 +296,14 @@ public static void SetXmlnsDefinition(DependencyObject dependencyObject, string /// [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] [AttachedPropertyBrowsableForType(typeof(DependencyObject))] - public static System.Collections.Hashtable GetXmlNamespaceMaps(DependencyObject dependencyObject) + public static Hashtable GetXmlNamespaceMaps(DependencyObject dependencyObject) { if (dependencyObject == null) { throw new ArgumentNullException( "dependencyObject" ); } - return (System.Collections.Hashtable)dependencyObject.GetValue(XmlNamespaceMapsProperty); + return (Hashtable)dependencyObject.GetValue(XmlNamespaceMapsProperty); } /// @@ -312,7 +312,7 @@ public static System.Collections.Hashtable GetXmlNamespaceMaps(DependencyObject /// /// XmlNamespaceMaps map xml namespace uri to Assembly/CLR namespaces /// - public static void SetXmlNamespaceMaps(DependencyObject dependencyObject, string value) + public static void SetXmlNamespaceMaps(DependencyObject dependencyObject, Hashtable value) { if (dependencyObject == null) { diff --git a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs index ab9eaf467e9..64ab8a64dc1 100644 --- a/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs +++ b/src/Microsoft.DotNet.Wpf/src/PresentationFramework/ref/PresentationFramework.cs @@ -11516,7 +11516,7 @@ internal XmlAttributeProperties() { } [System.Windows.AttachedPropertyBrowsableForTypeAttribute(typeof(System.Windows.DependencyObject))] [System.Windows.Markup.DesignerSerializationOptionsAttribute(System.Windows.Markup.DesignerSerializationOptions.SerializeAsAttribute)] public static string GetXmlSpace(System.Windows.DependencyObject dependencyObject) { throw null; } - public static void SetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject, string value) { } + public static void SetXmlNamespaceMaps(System.Windows.DependencyObject dependencyObject, System.Collections.Hashtable value) { } public static void SetXmlnsDefinition(System.Windows.DependencyObject dependencyObject, string value) { } public static void SetXmlnsDictionary(System.Windows.DependencyObject dependencyObject, System.Windows.Markup.XmlnsDictionary value) { } public static void SetXmlSpace(System.Windows.DependencyObject dependencyObject, string value) { } From 71275ca365d94490f532b4db0ca52f7e300a35b3 Mon Sep 17 00:00:00 2001 From: Anjali Sheel Date: Thu, 7 Dec 2023 11:29:20 +0530 Subject: [PATCH 3/3] Fix for API Compat error --- .../Baselines/PresentationFramework-ref-Net48.baseline.txt | 4 +++- .../System.Windows.Controls.Ribbon-ref-Net48.baseline.txt | 1 - .../ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt | 4 +--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref-Net48.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref-Net48.baseline.txt index 383310e431b..ccc913577fa 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref-Net48.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/PresentationFramework-ref-Net48.baseline.txt @@ -33,4 +33,6 @@ TypesMustExist : Type 'System.Windows.Interop.DocObjHost' does not exist in the CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Windows.Markup.StaticExtension' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.ComponentModel.TypeConverterAttribute' exists on 'System.Windows.Markup.TypeExtension' in the contract but not the implementation. CannotRemoveBaseTypeOrInterface : Type 'System.Windows.Markup.XamlParseException' does not implement interface 'System.Runtime.InteropServices._Exception' in the implementation but it does in the contract. -Total Issues: 34 +MembersMustExist : Member 'public System.String System.Windows.Markup.XmlAttributeProperties.GetXmlNamespaceMaps(System.Windows.DependencyObject)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public void System.Windows.Markup.XmlAttributeProperties.SetXmlNamespaceMaps(System.Windows.DependencyObject, System.String)' does not exist in the implementation but it does exist in the contract. +Total Issues: 36 diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt index 66f72086f77..fcc74cf8643 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/System.Windows.Controls.Ribbon-ref-Net48.baseline.txt @@ -1,2 +1 @@ -Compat issues with assembly System.Windows.Controls.Ribbon: Total Issues: 0 diff --git a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt index 641d6650c27..0e3a75ca1dd 100644 --- a/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt +++ b/src/Microsoft.DotNet.Wpf/ApiCompat/Baselines/UIAutomationProvider-ref.baseline.txt @@ -11,7 +11,6 @@ CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeA CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderFragment' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderFragmentRoot' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderHwndOverride' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IRawElementProviderSimple' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IScrollItemProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IScrollProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ISelectionItemProvider' in the contract but not the implementation. @@ -20,10 +19,9 @@ CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeA CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITableItemProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITableProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextProvider' in the contract but not the implementation. -CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITextRangeProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IToggleProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.ITransformProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IValueProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IVirtualizedItemProvider' in the contract but not the implementation. CannotRemoveAttribute : Attribute 'System.Runtime.InteropServices.InterfaceTypeAttribute' exists on 'System.Windows.Automation.Provider.IWindowProvider' in the contract but not the implementation. -Total Issues: 27 +Total Issues: 25