From f24705ff950d7ab034afe15e2ff253c33b5db7fd Mon Sep 17 00:00:00 2001 From: Wvader <34067397+wvader@users.noreply.github.com> Date: Fri, 30 Dec 2022 12:15:22 +0000 Subject: [PATCH] Allow multiple attributes --- .../AttributeSources/EfAddMethodsAttributeSource.cs | 2 +- .../AttributeSources/EfAddToListAttributeSource.cs | 2 +- .../AttributeSources/EfGetListAttributeSource.cs | 2 +- .../AttributeSources/EfGetManyAttributeSource.cs | 2 +- .../AttributeSources/EfGetOneByAttributeSource.cs | 2 +- .../AttributeSources/EfGetOneFromListAttributeSource.cs | 2 +- .../AttributeSources/EfUpdateMethodsAttributeSource.cs | 2 +- .../AttributeSources/GetOneWIthAttributeSource.cs | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/BlueWest.EfMethods/AttributeSources/EfAddMethodsAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfAddMethodsAttributeSource.cs index 7b38198..43cca62 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfAddMethodsAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfAddMethodsAttributeSource.cs @@ -27,7 +27,7 @@ namespace BlueWest.EfMethods.Sources } builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); diff --git a/src/BlueWest.EfMethods/AttributeSources/EfAddToListAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfAddToListAttributeSource.cs index e78f3dc..34e4c92 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfAddToListAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfAddToListAttributeSource.cs @@ -25,7 +25,7 @@ namespace BlueWest.EfMethods.EfMethods.AttributeSources builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); diff --git a/src/BlueWest.EfMethods/AttributeSources/EfGetListAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfGetListAttributeSource.cs index 6eff97f..a393782 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfGetListAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfGetListAttributeSource.cs @@ -26,7 +26,7 @@ namespace BlueWest.Sources builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); diff --git a/src/BlueWest.EfMethods/AttributeSources/EfGetManyAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfGetManyAttributeSource.cs index ff20982..2ab15d4 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfGetManyAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfGetManyAttributeSource.cs @@ -27,7 +27,7 @@ namespace BlueWest.EfMethods.Sources builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); builder diff --git a/src/BlueWest.EfMethods/AttributeSources/EfGetOneByAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfGetOneByAttributeSource.cs index 56b8e7b..6e8f1b3 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfGetOneByAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfGetOneByAttributeSource.cs @@ -25,7 +25,7 @@ namespace BlueWest.EfMethods.Sources .WriteLine("/// Generate Get One Entity helper functions with the specified nameof of the property, and the return type.") .WriteLine("/// "); builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); diff --git a/src/BlueWest.EfMethods/AttributeSources/EfGetOneFromListAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfGetOneFromListAttributeSource.cs index cf51f28..11c6f47 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfGetOneFromListAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfGetOneFromListAttributeSource.cs @@ -29,7 +29,7 @@ namespace BlueWest.Sources builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); diff --git a/src/BlueWest.EfMethods/AttributeSources/EfUpdateMethodsAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/EfUpdateMethodsAttributeSource.cs index 9039c12..d57b71b 100644 --- a/src/BlueWest.EfMethods/AttributeSources/EfUpdateMethodsAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/EfUpdateMethodsAttributeSource.cs @@ -23,7 +23,7 @@ namespace BlueWest.EfMethods.Sources .WriteLine("/// "); builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket(); diff --git a/src/BlueWest.EfMethods/AttributeSources/GetOneWIthAttributeSource.cs b/src/BlueWest.EfMethods/AttributeSources/GetOneWIthAttributeSource.cs index 3c711b6..3b8dff0 100644 --- a/src/BlueWest.EfMethods/AttributeSources/GetOneWIthAttributeSource.cs +++ b/src/BlueWest.EfMethods/AttributeSources/GetOneWIthAttributeSource.cs @@ -26,7 +26,7 @@ namespace BlueWest.EfMethods.Sources .WriteLine("/// "); builder - .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]") + .WriteLine("[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true)]") .WriteLine($"public sealed class {AttributeName}Attribute : Attribute") .WriteOpeningBracket();