New Column Filters

This commit is contained in:
JacobTech 2024-04-01 00:00:42 -04:00
parent 0cf7404b85
commit c30bd9aab3
3 changed files with 3 additions and 1 deletions

View File

@ -84,6 +84,7 @@ namespace ServerDatabase.SourceGenerator.Generated
string bad = prop.Type.ToString();
Console.WriteLine(prop);
bad = bad.Replace("ServerDatabase.TableColumn<", "");
bad = bad.Remove(0, bad.LastIndexOf(',')) + 1;
bad = bad.Remove(bad.LastIndexOf('>'));
if (bad.ToLower() == "byte[]") bad = "string";
EqualsValueClauseSyntax? equalsSyntax = prop.DeclaringSyntaxReferences[0].GetSyntax() switch

View File

@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<TargetFramework>netstandard2.0</TargetFramework>
<IncludeBuildOutput>true</IncludeBuildOutput>
<Version>1.0.2-alpha10</Version>
<Version>1.0.2-alpha12</Version>
<Title>Server Database Source Generator</Title>
<Authors>JacobTech</Authors>
</PropertyGroup>

View File

@ -81,6 +81,7 @@ namespace ServerDatabase.SourceGenerator.Generated
{
string bad = prop.Type.ToString();
bad = bad.Replace("ServerDatabase.TableColumn<", "");
bad = bad.Remove(0, bad.LastIndexOf(',') + 1);
bad = bad.Remove(bad.LastIndexOf('>'));
builder.AppendLine($" public {bad} {prop.Name} {{ get; set; }}");
}