|
| 1 | +// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. |
| 2 | +// Licensed to the .NET Foundation under one or more agreements. |
| 3 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 4 | +// See the LICENSE file in the project root for full license information. |
| 5 | + |
| 6 | +namespace ReactiveUI.SourceGenerators.Helpers; |
| 7 | + |
| 8 | +internal static class AttributeDefinitions |
| 9 | +{ |
| 10 | + public const string ReactiveObjectAttribute = """ |
| 11 | +// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. |
| 12 | +// Licensed to the .NET Foundation under one or more agreements. |
| 13 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 14 | +// See the LICENSE file in the project root for full license information. |
| 15 | +
|
| 16 | +using System; |
| 17 | +
|
| 18 | +// <auto-generated/> |
| 19 | +#pragma warning disable |
| 20 | +#nullable enable |
| 21 | +namespace ReactiveUI.SourceGenerators; |
| 22 | +
|
| 23 | +/// <summary> |
| 24 | +/// ReactiveObjectAttribute. |
| 25 | +/// </summary> |
| 26 | +/// <seealso cref="System.Attribute" /> |
| 27 | +[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "1.1.0.0")] |
| 28 | +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] |
| 29 | +public sealed class ReactiveObjectAttribute : Attribute; |
| 30 | +#nullable restore |
| 31 | +#pragma warning restore |
| 32 | +"""; |
| 33 | + |
| 34 | + public const string ReactiveCommandAttribute = """ |
| 35 | +// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. |
| 36 | +// Licensed to the .NET Foundation under one or more agreements. |
| 37 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 38 | +// See the LICENSE file in the project root for full license information. |
| 39 | +
|
| 40 | +using System; |
| 41 | +
|
| 42 | +// <auto-generated/> |
| 43 | +#pragma warning disable |
| 44 | +#nullable enable |
| 45 | +namespace ReactiveUI.SourceGenerators; |
| 46 | +
|
| 47 | +/// <summary> |
| 48 | +/// ReativeCommandAttribute. |
| 49 | +/// </summary> |
| 50 | +/// <seealso cref="Attribute" /> |
| 51 | +[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "1.1.0.0")] |
| 52 | +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)] |
| 53 | +public sealed class ReactiveCommandAttribute : Attribute |
| 54 | +{ |
| 55 | + /// <summary> |
| 56 | + /// Gets the can execute method or property. |
| 57 | + /// </summary> |
| 58 | + /// <value> |
| 59 | + /// The name of the CanExecute Observable of bool. |
| 60 | + /// </value> |
| 61 | + public string? CanExecute { get; init; } |
| 62 | +} |
| 63 | +#nullable restore |
| 64 | +#pragma warning restore |
| 65 | +"""; |
| 66 | + |
| 67 | + public const string ReactiveAttribute = """ |
| 68 | +// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. |
| 69 | +// Licensed to the .NET Foundation under one or more agreements. |
| 70 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 71 | +// See the LICENSE file in the project root for full license information. |
| 72 | +
|
| 73 | +using System; |
| 74 | +
|
| 75 | +// <auto-generated/> |
| 76 | +#pragma warning disable |
| 77 | +#nullable enable |
| 78 | +namespace ReactiveUI.SourceGenerators; |
| 79 | +
|
| 80 | +/// <summary> |
| 81 | +/// ReactiveAttribute. |
| 82 | +/// </summary> |
| 83 | +/// <seealso cref="Attribute" /> |
| 84 | +[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "1.1.0.0")] |
| 85 | +[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] |
| 86 | +public sealed class ReactiveAttribute : Attribute; |
| 87 | +#nullable restore |
| 88 | +#pragma warning restore |
| 89 | +"""; |
| 90 | + |
| 91 | + public const string ObservableAsPropertyAttribute = """ |
| 92 | +// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. |
| 93 | +// Licensed to the .NET Foundation under one or more agreements. |
| 94 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 95 | +// See the LICENSE file in the project root for full license information. |
| 96 | +
|
| 97 | +using System; |
| 98 | +
|
| 99 | +// <auto-generated/> |
| 100 | +#pragma warning disable |
| 101 | +#nullable enable |
| 102 | +namespace ReactiveUI.SourceGenerators; |
| 103 | +
|
| 104 | +/// <summary> |
| 105 | +/// ReactivePropertyAttribute. |
| 106 | +/// </summary> |
| 107 | +/// <seealso cref="Attribute" /> |
| 108 | +[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "1.1.0.0")] |
| 109 | +[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] |
| 110 | +public sealed class ObservableAsPropertyAttribute : Attribute; |
| 111 | +#nullable restore |
| 112 | +#pragma warning restore |
| 113 | +"""; |
| 114 | + |
| 115 | + public const string IViewForAttribute = """ |
| 116 | +// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved. |
| 117 | +// Licensed to the .NET Foundation under one or more agreements. |
| 118 | +// The .NET Foundation licenses this file to you under the MIT license. |
| 119 | +// See the LICENSE file in the project root for full license information. |
| 120 | +
|
| 121 | +using System; |
| 122 | +
|
| 123 | +// <auto-generated/> |
| 124 | +#pragma warning disable |
| 125 | +#nullable enable |
| 126 | +namespace ReactiveUI.SourceGenerators; |
| 127 | +
|
| 128 | +/// <summary> |
| 129 | +/// ReactiveObjectAttribute. |
| 130 | +/// </summary> |
| 131 | +/// <seealso cref="System.Attribute" /> |
| 132 | +/// <remarks> |
| 133 | +/// Initializes a new instance of the <see cref="IViewForAttribute"/> class. |
| 134 | +/// </remarks> |
| 135 | +/// <param name="viewModelType">Type of the view model.</param> |
| 136 | +[global::System.CodeDom.Compiler.GeneratedCode("ReactiveUI.SourceGenerators.IViewForGenerator", "1.1.0.0")] |
| 137 | +[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] |
| 138 | +public sealed class IViewForAttribute(string? viewModelType) : Attribute; |
| 139 | +#nullable restore |
| 140 | +#pragma warning restore |
| 141 | +"""; |
| 142 | +} |
0 commit comments