File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
nuget/Sqlite_net.SourceGenerator Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -191,12 +191,16 @@ static void Execute(
191191 sb . AppendLine ( ) ;
192192 sb . AppendLine ( $ "namespace { rootNamespace } ") ;
193193 sb . AppendLine ( "{" ) ;
194- sb . AppendLine ( " internal static class SQLiteInitializer" ) ;
194+ sb . AppendLine ( " public static class SQLiteInitializer" ) ;
195195 sb . AppendLine ( " {" ) ;
196- sb . AppendLine ( " public static void Init()" ) ;
196+ sb . AppendLine ( " private static bool initialized" ) ;
197+ sb . AppendLine ( " public static void Init()" ) ;
197198 sb . AppendLine ( " {" ) ;
199+ sb . AppendLine ( " if (initialized)" ) ;
200+ sb . AppendLine ( " return;" ) ;
201+ sb . AppendLine ( " initialized = true;" ) ;
198202
199- foreach ( var classInfo in classes )
203+ foreach ( var classInfo in classes )
200204 {
201205 foreach ( var property in classInfo . Properties )
202206 {
You can’t perform that action at this time.
0 commit comments