Fixup to new lower case convention

See c8ac73cd9a
This commit is contained in:
Shay Rojansky
2020-01-16 20:53:22 +01:00
parent c8ac73cd9a
commit 2967e28968
6 changed files with 12 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ using Xunit;
namespace EFCore.Naming.Test
{
public class LowerNamingTest
public class LowerCaseNamingTest
{
[Fact]
public void Table_name_is_rewritten()

View File

@@ -3,7 +3,7 @@ using Xunit;
namespace EFCore.Naming.Test
{
public class SnakeNamingTest
public class SnakeCaseNamingTest
{
[Fact]
public void Table_name_is_rewritten()

View File

@@ -4,6 +4,6 @@ namespace EFCore.NamingConventions.Internal
{
None,
SnakeCase,
AllLowerCase,
LowerCase
}
}

View File

@@ -22,7 +22,7 @@ namespace EFCore.NamingConventions.Internal
NameRewriterBase nameRewriter = namingStyle switch
{
NamingConvention.SnakeCase => new SnakeCaseNameRewriter(),
NamingConvention.AllLowerCase => new LowerCaseNameRewriter(),
NamingConvention.LowerCase => new LowerCaseNameRewriter(),
_ => throw new NotImplementedException("Unhandled enum value: " + namingStyle)
};

View File

@@ -40,7 +40,7 @@ namespace EFCore.NamingConventions.Internal
public virtual NamingConventionsOptionsExtension WithLowerCaseNamingConvention()
{
var clone = Clone();
clone._namingConvention = NamingConvention.AllLowerCase;
clone._namingConvention = NamingConvention.LowerCase;
return clone;
}
@@ -64,14 +64,14 @@ namespace EFCore.NamingConventions.Internal
=> _logFragment ??= Extension._namingConvention switch
{
NamingConvention.SnakeCase => "using snake-case naming ",
NamingConvention.AllLowerCase => "using lower case naming",
NamingConvention.LowerCase => "using lower case naming",
_ => ""
};
public override long GetServiceProviderHashCode() => Extension._namingConvention.GetHashCode();
public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)
=> debugInfo["Naming:" + nameof(NamingConventionsOptionsExtension)]
=> debugInfo["Naming:UseNamingConvention"]
= Extension._namingConvention.GetHashCode().ToString(CultureInfo.InvariantCulture);
}
}