-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add annotations for Meziantou.Framework.FastEnumToStringGenerator
- Loading branch information
Showing
9 changed files
with
119 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/Meziantou.Framework.FastEnumToStringGenerator.Annotations/FastEnumToStringAttribute.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Meziantou.Framework.Annotations; | ||
|
||
[System.Diagnostics.Conditional("FastEnumToString_Attributes")] | ||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] | ||
public sealed class FastEnumToStringAttribute : Attribute | ||
{ | ||
public FastEnumToStringAttribute(Type enumType) | ||
{ | ||
EnumType = enumType; | ||
} | ||
|
||
public bool IsPublic { get; set; } = true; | ||
public string? ExtensionMethodNamespace { get; set; } | ||
|
||
public Type EnumType { get; } | ||
} |
11 changes: 11 additions & 0 deletions
11
...ingGenerator.Annotations/Meziantou.Framework.FastEnumToStringGenerator.Annotations.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFrameworks>$(LatestTargetFrameworks);netstandard2.0</TargetFrameworks> | ||
<Description>Attributes for the Meziantou.Framework.FastEnumToStringGenerator source generator</Description> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Remove="Meziantou.Polyfill" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...Framework.FastEnumToStringGenerator/Meziantou.Framework.FastEnumToStringGenerator.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<MeziantouImplicitUsings Condition="'$(MeziantouImplicitUsings)' == ''">$(ImplicitUsings)</MeziantouImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="$(MeziantouImplicitUsings) == 'enable'"> | ||
<!-- For source compatibility between v1 and v2 --> | ||
<Using Include="Meziantou.Framework.Annotations"/> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters