diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FriendAccessAllowedAttribute.cs b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FriendAccessAllowedAttribute.cs
index 4bd4ba8a3ee..7d9acbda5f7 100644
--- a/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FriendAccessAllowedAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/FriendAccessAllowedAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
// Description: Implementation of a FriendAccessAllowedAttribute attribute that is used to mark internal metadata
// that is allowed to be accessed from friend assemblies.
diff --git a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/RuntimeIdentifierPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/RuntimeIdentifierPropertyAttribute.cs
index bc1bfc45a58..d65f78a6aee 100644
--- a/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/RuntimeIdentifierPropertyAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/Shared/System/Windows/Markup/RuntimeIdentifierPropertyAttribute.cs
@@ -2,7 +2,10 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+#if !SYSTEM_XAML
#nullable disable
+#pragma warning disable CS8632
+#endif
// Description:
// This attribute is placed on a class to identify the property that will
@@ -34,7 +37,7 @@ public sealed class RuntimeNamePropertyAttribute: Attribute
///
public RuntimeNamePropertyAttribute(string name)
{
- _name = name;
+ Name = name;
}
///
@@ -42,15 +45,7 @@ public RuntimeNamePropertyAttribute(string name)
/// the class, this property needs to be of type string and have
/// both get and set access
///
- public string Name
- {
- get
- {
- return _name;
- }
- }
-
- private string _name;
+ public string Name { get; }
}
#endif
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AcceptedMarkupExtensionExpressionTypeAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AcceptedMarkupExtensionExpressionTypeAttribute.cs
index 43967526c16..d0f6c2f84b8 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AcceptedMarkupExtensionExpressionTypeAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AcceptedMarkupExtensionExpressionTypeAttribute.cs
@@ -13,7 +13,7 @@ public class AcceptedMarkupExtensionExpressionTypeAttribute: Attribute
public Type Type { get; set; }
public AcceptedMarkupExtensionExpressionTypeAttribute(Type type)
- {
+ {
Type = type;
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AmbientAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AmbientAttribute.cs
index 15065a7e680..b99522d6e58 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AmbientAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/AmbientAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ConstructorArgumentAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ConstructorArgumentAttribute.cs
index 3151633d1ff..16bfa7df788 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ConstructorArgumentAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ConstructorArgumentAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentPropertyAttribute.cs
index 137c9ba5671..c7b914e847f 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentPropertyAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentPropertyAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
@@ -30,7 +28,7 @@ public ContentPropertyAttribute()
/// of XAML content with property of the given name.
///
/// The property to associate to direct XAML content
- public ContentPropertyAttribute(string name)
+ public ContentPropertyAttribute(string? name)
{
Name = name;
}
@@ -38,6 +36,6 @@ public ContentPropertyAttribute(string name)
///
/// The name of the property that is associated with direct XAML content
///
- public string Name { get; }
+ public string? Name { get; }
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentWrapperAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentWrapperAttribute.cs
index 2954af22589..5482c209626 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentWrapperAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/ContentWrapperAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
@@ -42,7 +40,7 @@ public ContentWrapperAttribute(Type contentWrapper)
/// Overrides Object.Equals to implement correct equality semantics for this
/// attribute.
///
- public override bool Equals(object obj)
+ public override bool Equals(object? obj)
{
return
obj is ContentWrapperAttribute other &&
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DependsOnAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DependsOnAttribute.cs
index a8def02c5fd..e7ad948b8a5 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DependsOnAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DependsOnAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DictionaryKeyPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DictionaryKeyPropertyAttribute.cs
index 5e4e0cf3c89..7fd216cef67 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DictionaryKeyPropertyAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/DictionaryKeyPropertyAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionBracketCharactersAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionBracketCharactersAttribute.cs
index 69c9c461344..b5794be8512 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionBracketCharactersAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionBracketCharactersAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
namespace System.Windows.Markup
{
///
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionReturnTypeAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionReturnTypeAttribute.cs
index 4bb6e792bc1..e5aa28430d4 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionReturnTypeAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/MarkupExtensionReturnTypeAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
namespace System.Windows.Markup
{
///
@@ -16,7 +14,7 @@ public MarkupExtensionReturnTypeAttribute()
{
}
- public MarkupExtensionReturnTypeAttribute(Type returnType)
+ public MarkupExtensionReturnTypeAttribute(Type? returnType)
{
ReturnType = returnType;
}
@@ -24,15 +22,15 @@ public MarkupExtensionReturnTypeAttribute(Type returnType)
[Obsolete("The expressionType argument is not used by the XAML parser. To specify the expected return type, " +
"use MarkupExtensionReturnTypeAttribute(Type). To specify custom handling for expression types, use " +
"XamlSetMarkupExtensionAttribute.")]
- public MarkupExtensionReturnTypeAttribute(Type returnType, Type expressionType)
+ public MarkupExtensionReturnTypeAttribute(Type? returnType, Type? expressionType)
{
ReturnType = returnType;
ExpressionType = expressionType;
}
- public Type ReturnType { get; }
+ public Type? ReturnType { get; }
[Obsolete("This is not used by the XAML parser. Please look at XamlSetMarkupExtensionAttribute.")]
- public Type ExpressionType { get; }
+ public Type? ExpressionType { get; }
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameScopePropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameScopePropertyAttribute.cs
index 6dea6b823da..6b9d8e18017 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameScopePropertyAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/NameScopePropertyAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
@@ -12,17 +10,17 @@ namespace System.Windows.Markup
[TypeForwardedFrom("WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
public sealed class NameScopePropertyAttribute : Attribute
{
- public NameScopePropertyAttribute (string name)
+ public NameScopePropertyAttribute(string name)
{
Name = name;
}
- public NameScopePropertyAttribute (string name, Type type) : this(name)
+ public NameScopePropertyAttribute(string name, Type? type) : this(name)
{
Type = type;
}
public string Name { get; }
- public Type Type { get; }
+ public Type? Type { get; }
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/RootNamespaceAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/RootNamespaceAttribute.cs
index a1fcb24a3dd..02f41706264 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/RootNamespaceAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/RootNamespaceAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TrimSurroundingWhitespaceAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TrimSurroundingWhitespaceAttribute.cs
index b86992231a6..2da526816d6 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TrimSurroundingWhitespaceAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/TrimSurroundingWhitespaceAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UidPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UidPropertyAttribute.cs
index 24bd4491737..1fcc2ef0f6a 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UidPropertyAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UidPropertyAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UsableDuringInitializationAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UsableDuringInitializationAttribute.cs
index 774bf141472..2b291292485 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UsableDuringInitializationAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/UsableDuringInitializationAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
namespace System.Windows.Markup
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/WhitespaceSignificantCollectionAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/WhitespaceSignificantCollectionAttribute.cs
index 47acab59348..d4b129d4828 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/WhitespaceSignificantCollectionAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/WhitespaceSignificantCollectionAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlDeferLoadAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlDeferLoadAttribute.cs
index 6ad56a396e8..1258b44ab56 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlDeferLoadAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlDeferLoadAttribute.cs
@@ -2,43 +2,32 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
namespace System.Windows.Markup
{
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public sealed class XamlDeferLoadAttribute : Attribute
{
- string _contentTypeName;
- string _loaderTypeName;
-
public XamlDeferLoadAttribute(Type loaderType, Type contentType)
{
ArgumentNullException.ThrowIfNull(loaderType);
ArgumentNullException.ThrowIfNull(contentType);
- _loaderTypeName = loaderType.AssemblyQualifiedName;
- _contentTypeName = contentType.AssemblyQualifiedName;
+ LoaderTypeName = loaderType.AssemblyQualifiedName!;
+ ContentTypeName = contentType.AssemblyQualifiedName!;
LoaderType = loaderType;
ContentType = contentType;
}
public XamlDeferLoadAttribute(string loaderType, string contentType)
{
- _loaderTypeName = loaderType ?? throw new ArgumentNullException(nameof(loaderType));
- _contentTypeName = contentType ?? throw new ArgumentNullException(nameof(contentType));
+ LoaderTypeName = loaderType ?? throw new ArgumentNullException(nameof(loaderType));
+ ContentTypeName = contentType ?? throw new ArgumentNullException(nameof(contentType));
}
- public string LoaderTypeName
- {
- get { return _loaderTypeName; }
- }
+ public string LoaderTypeName { get; }
- public string ContentTypeName
- {
- get { return _contentTypeName; }
- }
+ public string ContentTypeName { get; }
- public Type LoaderType { get; private set; }
- public Type ContentType { get; private set; }
+ public Type? LoaderType { get; private set; }
+ public Type? ContentType { get; private set; }
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionAttribute.cs
index bb7157cedf5..877eab81bd9 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetMarkupExtensionAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
namespace System.Windows.Markup
{
[AttributeUsage(AttributeTargets.Class, Inherited=true, AllowMultiple=false)]
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterAttribute.cs
index 252a79fe5cf..4da1de3254d 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XamlSetTypeConverterAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
namespace System.Windows.Markup
{
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = false)]
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlLangPropertyAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlLangPropertyAttribute.cs
index d94bc672a00..ee5b028bd73 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlLangPropertyAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlLangPropertyAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
@@ -29,7 +27,7 @@ public sealed class XmlLangPropertyAttribute : Attribute
/// Creates a new XmlLangPropertyAttribute with the given string
/// as the property name.
///
- public XmlLangPropertyAttribute(string name)
+ public XmlLangPropertyAttribute(string? name)
{
Name = name;
}
@@ -37,6 +35,6 @@ public XmlLangPropertyAttribute(string name)
///
/// The name of the property that is designated to accept the xml:lang value
///
- public string Name { get; }
+ public string? Name { get; }
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsCompatibleWithAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsCompatibleWithAttribute.cs
index e630b6354a4..211dcdd2703 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsCompatibleWithAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsCompatibleWithAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsDefinitionAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsDefinitionAttribute.cs
index 25b30c0782e..ca5fbf058ac 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsDefinitionAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsDefinitionAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup
@@ -35,7 +33,7 @@ namespace System.Windows.Markup
///
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
[TypeForwardedFrom("WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
- public sealed class XmlnsDefinitionAttribute: Attribute
+ public sealed class XmlnsDefinitionAttribute : Attribute
{
///
/// Constructor
@@ -74,6 +72,6 @@ public XmlnsDefinitionAttribute(string xmlNamespace, string clrNamespace)
/// If the assemblyName is not set, the code should take the assembly
/// for which the instance of this attribute is created.
///
- public string AssemblyName { get; set; }
+ public string? AssemblyName { get; set; }
}
}
diff --git a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsPrefixAttribute.cs b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsPrefixAttribute.cs
index 7c708ef4be7..d511cb8617b 100644
--- a/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsPrefixAttribute.cs
+++ b/src/Microsoft.DotNet.Wpf/src/System.Xaml/System/Windows/Markup/XmlnsPrefixAttribute.cs
@@ -2,8 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-#nullable disable
-
using System.Runtime.CompilerServices;
namespace System.Windows.Markup