File tree Expand file tree Collapse file tree 7 files changed +14
-0
lines changed Expand file tree Collapse file tree 7 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44
55using System ;
6+ using System . Diagnostics ;
67using System . Linq ;
78using CommunityToolkit . Mvvm . Input ;
89
@@ -49,6 +50,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
4950/// </code>
5051/// </summary>
5152[ AttributeUsage ( AttributeTargets . Field , AllowMultiple = true , Inherited = false ) ]
53+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
5254public sealed class AlsoNotifyCanExecuteForAttribute : Attribute
5355{
5456 /// <summary>
Original file line number Diff line number Diff line change 44
55using System ;
66using System . ComponentModel ;
7+ using System . Diagnostics ;
78using System . Linq ;
89
910namespace CommunityToolkit . Mvvm . ComponentModel ;
@@ -68,6 +69,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
6869/// </code>
6970/// </summary>
7071[ AttributeUsage ( AttributeTargets . Field , AllowMultiple = true , Inherited = false ) ]
72+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
7173public sealed class AlsoNotifyChangeForAttribute : Attribute
7274{
7375 /// <summary>
Original file line number Diff line number Diff line change 44
55using System ;
66using System . ComponentModel ;
7+ using System . Diagnostics ;
78
89namespace CommunityToolkit . Mvvm . ComponentModel ;
910
@@ -24,6 +25,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
2425/// </para>
2526/// </summary>
2627[ AttributeUsage ( AttributeTargets . Class , AllowMultiple = false , Inherited = false ) ]
28+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
2729public sealed class INotifyPropertyChangedAttribute : Attribute
2830{
2931 /// <summary>
Original file line number Diff line number Diff line change 44
55using System ;
66using System . ComponentModel ;
7+ using System . Diagnostics ;
78
89namespace CommunityToolkit . Mvvm . ComponentModel ;
910
@@ -26,6 +27,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
2627/// And with this, the same APIs from <see cref="ObservableObject"/> will be available on this type as well.
2728/// </summary>
2829[ AttributeUsage ( AttributeTargets . Class , AllowMultiple = false , Inherited = false ) ]
30+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
2931public sealed class ObservableObjectAttribute : Attribute
3032{
3133}
Original file line number Diff line number Diff line change 44
55using System ;
66using System . ComponentModel ;
7+ using System . Diagnostics ;
78
89namespace CommunityToolkit . Mvvm . ComponentModel ;
910
@@ -51,6 +52,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
5152/// source field name will be converted to uppercase (eg. <c>isEnabled</c> to <c>IsEnabled</c>).
5253/// </remarks>
5354[ AttributeUsage ( AttributeTargets . Field , AllowMultiple = false , Inherited = false ) ]
55+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
5456public sealed class ObservablePropertyAttribute : Attribute
5557{
5658}
Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44
55using System ;
6+ using System . Diagnostics ;
67
78namespace CommunityToolkit . Mvvm . ComponentModel ;
89
@@ -40,6 +41,7 @@ namespace CommunityToolkit.Mvvm.ComponentModel;
4041/// If this condition is not met, the code will fail to build.
4142/// </remarks>
4243[ AttributeUsage ( AttributeTargets . Class , AllowMultiple = false , Inherited = false ) ]
44+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
4345public sealed class ObservableRecipientAttribute : Attribute
4446{
4547}
Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44
55using System ;
6+ using System . Diagnostics ;
67using System . Windows . Input ;
78
89namespace CommunityToolkit . Mvvm . Input ;
@@ -60,6 +61,7 @@ namespace CommunityToolkit.Mvvm.Input;
6061/// </para>
6162/// </summary>
6263[ AttributeUsage ( AttributeTargets . Method , AllowMultiple = false , Inherited = false ) ]
64+ [ Conditional ( "MVVMTOOLKIT_KEEP_SOURCE_GENERATOR_ATTRIBUTES" ) ]
6365public sealed class ICommandAttribute : Attribute
6466{
6567 /// <summary>
You can’t perform that action at this time.
0 commit comments