{"record":{"id":"8416131211e61fc3","repo":"dotnet/wpf","slug":"ignoring-this-since-this-type-will-go-away-soon","errorCode":null,"errorMessage":"ignoring this, since this type will go away soon.","messagePattern":"ignoring this, since this type will go away soon\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XaslMember.cs","lineNumber":153,"sourceCode":"        }\n\n        [DefaultValue(null)]\n        new public XamlProperty DependsOn\n        {\n            get { return DependsOnCore; }\n            set { DependsOnCore = value; }\n        }\n\n        [DefaultValue(false)]\n        new public bool IsAmbient\n        {\n            get { return IsAmbientCore; }\n            set { IsAmbientCore = value; }\n        }\n\n        public override IList<string> GetXmlNamespaces()\n        {\n            throw new NotImplementedException(\"ignoring this, since this type will go away soon.\");\n        }\n\n        // ----- Protected Overrides -----\n        protected override String NameCore\n        {\n            get { return _name; }\n            set { _name = value; }\n        }\n\n        protected override bool IsPublicCore\n        {\n            get { return _isPublic; }\n            set { _isPublic = value; }\n        }\n\n        protected override bool IsBrowsableCore\n        {\n            get { return _isBrowsable; }","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Xaml/Schema/XaslMember.cs#L135-L171","documentation":"XaslMember.GetXmlNamespaces is an unfinished override that unconditionally throws NotImplementedException with a placeholder message indicating the type itself is slated for removal. Any code path asking a XaslMember for its XML namespaces hits this stub; the library authors never implemented it because the whole Xasl* layer is legacy/deprecated.","triggerScenarios":"Calling GetXmlNamespaces() on any XaslMember instance — directly, or via XAML schema processing that queries member namespaces (e.g. writing x:Namespace declarations for a member).","commonSituations":"Maintaining code that still uses the legacy Xasl (non-'Xaml'-spelled) classes; framework code that enumerates GetXmlNamespaces on all XamlMembers and encounters XaslMember instances; attempted migration of Xasl-based markup to standard System.Xaml tooling.","solutions":["Migrate off XaslMember to the standard XamlMember implementation, which supports GetXmlNamespaces — the class is deprecated and will be removed.","Return a static/empty namespace list from a derived class overriding GetXmlNamespaces if you must keep using XaslMember.","Catch NotImplementedException around namespace queries and treat the member as having no XML namespaces."],"exampleFix":"// before\nvar ns = xaslMember.GetXmlNamespaces();\n// after\nvar ns = xaslMember is XamlMember m ? m.GetXmlNamespaces() : (IList<string>)Array.Empty<string>();","handlingStrategy":"try-catch","validationCode":"bool implemented = !(member is XaslMember); // XaslMember.GetXmlNamespaces always throws","typeGuard":"static bool SupportsXmlNamespaces(XamlMember m) => m is not XaslMember;","tryCatchPattern":"try { var ns = member.GetXmlNamespaces(); } catch (NotImplementedException) { var ns = (IList<string>)Array.Empty<string>(); }","preventionTips":["Do not build new code on the deprecated Xasl* classes; use XamlMember.","Guard namespace queries when iterating heterogeneous member collections.","Override GetXmlNamespaces in derived legacy classes if namespace data is needed.","Track the removal of Xasl types and migrate before the API disappears."],"tags":["xaml","notimplemented","deprecated-api","legacy"],"backgroundTag":"method-not-implemented","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}