diff --git a/docs/CHANGELOG-Prerelease.md b/docs/CHANGELOG-Prerelease.md index f014ae3..b6f2d62 100644 --- a/docs/CHANGELOG-Prerelease.md +++ b/docs/CHANGELOG-Prerelease.md @@ -19,6 +19,7 @@ Prerelease Changelog - **Fixed** _ArgumentException_ in `Enum.IsDefined-Generator` when multiple _partial class type declarations_ have at least one `GeneratedEnumIsDefinedAttribute`. - **Fixed** `Enum.GetName-Generator` generating invalid C# source when the type argument of `GeneratedEnumGetNameAttribute` is not an _enum_ type. - **Fixed** `Enum.IsDefined-Generator` generating invalid C# source when the type argument of `GeneratedEnumIsDefinedAttribute` is not an _enum_ type. +- **Fixed** `Enum-Interceptor-Generator` not including _invocation expressions_ targeting the _Enum_ methods when a `using static` directive (C# 6) imports these static members. ### Package - **Added** documentation to `README.md`. diff --git a/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs b/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs index f939f8c..88833c8 100644 --- a/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs +++ b/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs @@ -107,6 +107,8 @@ public void Method(UriKind parameter1, UriFormat parameter2) _ = Enum.IsDefined(default(Enum2)); _ = Alias.GetName(UriKind.Absolute); _ = Alias.IsDefined(UriFormat.Unescaped); + _ = GetName(UriKind.Absolute); + _ = IsDefined(UriFormat.Unescaped); _ = Enum.GetName((UriKind)0); _ = Enum.IsDefined((UriFormat)0); _ = global::System.Enum.GetName(global::System.UriKind.Absolute); @@ -171,8 +173,9 @@ internal static bool IsDefined(global::System.StringSplitOptions value) [InterceptsLocation(@"/0/Test1.cs", 26, 12)] [InterceptsLocation(@"/0/Test1.cs", 28, 12)] [InterceptsLocation(@"/0/Test1.cs", 30, 13)] - [InterceptsLocation(@"/0/Test1.cs", 32, 12)] - [InterceptsLocation(@"/0/Test1.cs", 34, 27)] + [InterceptsLocation(@"/0/Test1.cs", 32, 07)] + [InterceptsLocation(@"/0/Test1.cs", 34, 12)] + [InterceptsLocation(@"/0/Test1.cs", 36, 27)] internal static string? GetName(global::System.UriKind value) { return value switch @@ -189,8 +192,9 @@ internal static bool IsDefined(global::System.StringSplitOptions value) [InterceptsLocation(@"/0/Test1.cs", 27, 12)] [InterceptsLocation(@"/0/Test1.cs", 29, 12)] [InterceptsLocation(@"/0/Test1.cs", 31, 13)] - [InterceptsLocation(@"/0/Test1.cs", 33, 12)] - [InterceptsLocation(@"/0/Test1.cs", 35, 27)] + [InterceptsLocation(@"/0/Test1.cs", 33, 07)] + [InterceptsLocation(@"/0/Test1.cs", 35, 12)] + [InterceptsLocation(@"/0/Test1.cs", 37, 27)] internal static bool IsDefined(global::System.UriFormat value) { return value is