Skip to content

Commit

Permalink
fix: aot gen should not add old attributes (GeneratedFormatterAttribu…
Browse files Browse the repository at this point in the history
…te) #56
  • Loading branch information
rikimaru0345 committed Sep 10, 2019
1 parent 86d71c0 commit c2fb956
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/Ceras.AotGenerator/SourceGenerator/SourceFormatterGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
namespace CerasAotFormatterGenerator
using Ceras;
using Ceras.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;

namespace CerasAotFormatterGenerator
{
using Ceras;
using Ceras.Helpers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ceras.Formatters;
using System.Reflection;
using System.Linq;

static class SourceFormatterGenerator
static class SourceFormatterGenerator
{
public static void GenerateAll(List<Type> targets, CerasSerializer ceras, StringBuilder text)
{
Expand Down Expand Up @@ -41,7 +39,6 @@ public static void UseFormatters(SerializerConfig config)

static void Generate(Type type, CerasSerializer ceras, StringBuilder text)
{
text.AppendLine("[GeneratedFormatterAttribute]");
text.AppendLine($"\tinternal class {type.ToVariableSafeName()}Formatter : IFormatter<{type.ToFriendlyName(true)}>");
text.AppendLine("\t{");
GenerateClassContent(text, ceras, type);
Expand Down

0 comments on commit c2fb956

Please sign in to comment.