diff --git a/src/Conventions.Analyzers/Helpers.cs b/src/Conventions.Analyzers/Helpers.cs index 7cbfc4109..4bbc22efa 100644 --- a/src/Conventions.Analyzers/Helpers.cs +++ b/src/Conventions.Analyzers/Helpers.cs @@ -72,7 +72,7 @@ public static string GetGenericDisplayName(ISymbol? symbol) if (namedTypeSymbol.IsOpenGenericType()) { sb.Append('<'); - for (var i = 1; i < namedTypeSymbol.Arity - 1; i++) + for (var i = 1; i < namedTypeSymbol.Arity; i++) sb.Append(','); sb.Append('>'); } @@ -135,7 +135,7 @@ public static string GetTypeOfName(ISymbol? symbol) if (namedTypeSymbol.IsOpenGenericType()) { sb.Append('<'); - for (var i = 1; i < namedTypeSymbol.Arity - 1; i++) + for (var i = 1; i < namedTypeSymbol.Arity; i++) sb.Append(','); sb.Append('>'); } diff --git a/test/Analyzers.Tests/ProviderIntegrationTests/AutoMapperTests.cs b/test/Analyzers.Tests/ProviderIntegrationTests/AutoMapperTests.cs index 6806ecadc..8297587b2 100644 --- a/test/Analyzers.Tests/ProviderIntegrationTests/AutoMapperTests.cs +++ b/test/Analyzers.Tests/ProviderIntegrationTests/AutoMapperTests.cs @@ -45,6 +45,21 @@ private class Profile1 : Profile; private class Mapper : Profile; + public class DocumentCreatedByValueResolver : DocumentStringMetadataValueResolver; + + public abstract class DocumentStringMetadataValueResolver : IValueResolver + { + protected virtual string GetValue(string metadataValue) + { + throw new NotImplementedException(); + } + + public string Resolve(TSource source, TDestination destination, string destMember, ResolutionContext context) + { + throw new NotImplementedException(); + } + } + private class A : IValueResolver { diff --git a/test/Analyzers.Tests/ProviderIntegrationTests/snapshots/AutoMapperTests.Should_Work_With_AutoMapper#Compiled_AssemblyProvider.verified.cs b/test/Analyzers.Tests/ProviderIntegrationTests/snapshots/AutoMapperTests.Should_Work_With_AutoMapper#Compiled_AssemblyProvider.verified.cs index 3617e6c61..f51d8ec6f 100644 --- a/test/Analyzers.Tests/ProviderIntegrationTests/snapshots/AutoMapperTests.Should_Work_With_AutoMapper#Compiled_AssemblyProvider.verified.cs +++ b/test/Analyzers.Tests/ProviderIntegrationTests/snapshots/AutoMapperTests.Should_Work_With_AutoMapper#Compiled_AssemblyProvider.verified.cs @@ -39,6 +39,7 @@ IEnumerable IAssemblyProvider.GetTypes(Func); yield return RocketSurgeryConventionsAnalyzersTests.GetType("Rocket.Surgery.Conventions.Analyzers.Tests.ProviderIntegrationTests.AutoMapperTests+E"); break; }