Skip to content

Commit

Permalink
Add '[DisallowNull]' to 'DefaultValueCallback'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Dec 7, 2024
1 parent c053699 commit b0e178e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ internal sealed class GeneratedDependencyPropertyAttribute : global::System.Attr
/// <remarks>
/// Using this property is mutually exclusive with <see cref="DefaultValue"/>.
/// </remarks>
#if NET8_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.DisallowNull]
#endif
public string? DefaultValueCallback { get; init; } = null;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// See the LICENSE file in the project root for more information.

using System;
#if NET8_0_OR_GREATER
using System.Diagnostics.CodeAnalysis;
#endif
#if WINDOWS_UWP || HAS_UNO
using DependencyObject = Windows.UI.Xaml.DependencyObject;
using DependencyProperty = Windows.UI.Xaml.DependencyProperty;
Expand Down Expand Up @@ -62,6 +65,9 @@ public sealed class GeneratedDependencyPropertyAttribute : Attribute
/// <remarks>
/// Using this property is mutually exclusive with <see cref="DefaultValue"/>.
/// </remarks>
#if NET8_0_OR_GREATER
[DisallowNull]
#endif
public string? DefaultValueCallback { get; init; } = null;

/// <summary>
Expand Down

0 comments on commit b0e178e

Please sign in to comment.