@@ -69,7 +69,7 @@ private void Execute(SourceProductionContext spc,
6969 var pluginClasses = data . Item1 . Item1 . PluginClassInfos ;
7070 var enumsDeclarations = data . Item1 . Item1 . EnumsDeclarations ;
7171
72- var assemblyName = compilation . AssemblyName ?? Constants . DefaultNamespace ;
72+ var assemblyNamespace = compilation . AssemblyName ?? Constants . DefaultNamespace ;
7373 var useDI = configOptions . GetFLLUseDependencyInjection ( ) ;
7474
7575 var pluginInfo = PluginInfoHelper . GetValidPluginInfoAndReportDiagnostic ( pluginClasses , spc , useDI ) ;
@@ -85,7 +85,7 @@ private void Execute(SourceProductionContext spc,
8585 if ( enumSymbol ? . GetAttributes ( ) . Any ( ad =>
8686 ad . AttributeClass ? . Name == Constants . EnumLocalizeAttributeName ) ?? false )
8787 {
88- GenerateSource ( spc , enumSymbol , useDI , pluginInfo , assemblyName ) ;
88+ GenerateSource ( spc , enumSymbol , useDI , pluginInfo , assemblyNamespace ) ;
8989 }
9090 }
9191 }
@@ -156,7 +156,7 @@ private void GenerateSource(
156156 INamedTypeSymbol enumSymbol ,
157157 bool useDI ,
158158 PluginClassInfo pluginInfo ,
159- string assemblyName )
159+ string assemblyNamespace )
160160 {
161161 var enumFullName = enumSymbol . ToDisplayString ( SymbolDisplayFormat . FullyQualifiedFormat ) ;
162162 var enumDataClassName = $ "{ enumSymbol . Name } { Constants . EnumLocalizeClassSuffix } ";
@@ -222,7 +222,7 @@ private void GenerateSource(
222222 }
223223 else if ( pluginInfo ? . IsValid == true )
224224 {
225- getTranslation = $ "{ pluginInfo . ContextAccessor } .API.GetTranslation";
225+ getTranslation = $ "{ assemblyNamespace } . { pluginInfo . ContextAccessor } .API.GetTranslation";
226226 }
227227
228228 // Generate GetValues method
@@ -249,7 +249,7 @@ private void GenerateSource(
249249 sourceBuilder . AppendLine ( $ "}}") ;
250250
251251 // Add source to context
252- spc . AddSource ( $ "{ Constants . ClassName } .{ assemblyName } .{ enumNamespace } .{ enumDataClassName } .g.cs", SourceText . From ( sourceBuilder . ToString ( ) , Encoding . UTF8 ) ) ;
252+ spc . AddSource ( $ "{ Constants . ClassName } .{ assemblyNamespace } .{ enumNamespace } .{ enumDataClassName } .g.cs", SourceText . From ( sourceBuilder . ToString ( ) , Encoding . UTF8 ) ) ;
253253 }
254254
255255 private static void GeneratedHeaderFromPath ( StringBuilder sb , string enumFullName )
0 commit comments