@@ -608,7 +608,7 @@ public static string MethodParametersJavadocSignature(this OdcmMethod method)
608608 return parameterSignatureBuilder . ToString ( ) ;
609609 }
610610
611- public static string GetPropertyNamespace ( this OdcmProperty p ) => p . Projection . Type . Namespace . Name . NamespaceName ( ) ;
611+ public static string GetPropertyNamespace ( this OdcmProperty p ) => p . Projection . Type . Namespace . Name . AddPrefix ( ) ;
612612
613613 public static string MethodParametersSignature ( this OdcmMethod method )
614614 {
@@ -861,7 +861,7 @@ public static StringBuilder ImportClassesOfMethodParameters(OdcmMethod method, s
861861 appendEnumSet = true ;
862862 }
863863
864- importStatements . Add ( string . Format ( importFormat , p . Type . Namespace . Name . NamespaceName ( ) , p . GetPackagePrefix ( ) , propertyType ) ) ;
864+ importStatements . Add ( string . Format ( importFormat , p . Type . Namespace . Name . AddPrefix ( ) , p . GetPackagePrefix ( ) , propertyType ) ) ;
865865 }
866866 }
867867
@@ -1017,7 +1017,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
10171017import {0}.http.*;
10181018import {0}.serializer.*;
10191019import java.util.Arrays;
1020- import java.util.EnumSet;" , host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ) ;
1020+ import java.util.EnumSet;" , host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ) ;
10211021
10221022 sb . Append ( "\n " ) ;
10231023 var importFormat = @"import {0}.{1}.{2};" ;
@@ -1037,7 +1037,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
10371037
10381038 string prefixValue = property . GetPackagePrefix ( ) ;
10391039 string importstr = String . Format ( importFormat ,
1040- property . Projection . Type . Namespace . Name . NamespaceName ( ) ,
1040+ property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
10411041 prefixValue ,
10421042 propertyType ) ;
10431043 if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1054,7 +1054,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
10541054 {
10551055 string prefixValue = GetPrefixForModels ( ) ;
10561056 string importstr = String . Format ( importFormat ,
1057- ( host . CurrentType . BaseClass ( ) as OdcmClass ) . Namespace . Name . NamespaceName ( ) ,
1057+ ( host . CurrentType . BaseClass ( ) as OdcmClass ) . Namespace . Name . AddPrefix ( ) ,
10581058 prefixValue ,
10591059 baseClassNameType ) ;
10601060 if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1069,7 +1069,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
10691069 if ( baseTypeNameStr == "BasePlannerAssignments" )
10701070 {
10711071 string importstr = String . Format ( importFormat ,
1072- host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ,
1072+ host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ,
10731073 "models.extensions" ,
10741074 "PlannerAssignment" ) ;
10751075 if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1082,7 +1082,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
10821082 if ( baseTypeNameStr == "BasePlannerChecklistItems" )
10831083 {
10841084 string importstr = String . Format ( importFormat ,
1085- host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ,
1085+ host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ,
10861086 "models.extensions" ,
10871087 "PlannerChecklistItem" ) ;
10881088 if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1102,7 +1102,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
11021102
11031103 var propertyType = TypeCollectionResponse ( property ) ;
11041104 string importstr = String . Format ( importFormat ,
1105- property . Projection . Type . Namespace . Name . NamespaceName ( ) ,
1105+ property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
11061106 GetPrefixForRequests ( ) ,
11071107 propertyType ) ;
11081108 if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1114,7 +1114,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
11141114
11151115 string propertyValue = TypeCollectionPage ( property ) ;
11161116 string importstr1 = String . Format ( importFormat ,
1117- property . Projection . Type . Namespace . Name . NamespaceName ( ) ,
1117+ property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
11181118 GetPrefixForRequests ( ) ,
11191119 propertyValue ) ;
11201120 if ( ! uniqueStore . ContainsKey ( importstr1 ) )
@@ -1151,7 +1151,7 @@ public static string CreatePackageDef(this CustomT4Host host)
11511151 switch ( host . CurrentType )
11521152 {
11531153 case OdcmProperty p :
1154- @namespace = p . Type . Namespace . Name . NamespaceName ( ) ;
1154+ @namespace = p . Type . Namespace . Name . AddPrefix ( ) ;
11551155 break ;
11561156 case OdcmMethod m :
11571157 var sb = new StringBuilder ( Environment . NewLine ) ;
@@ -1165,7 +1165,7 @@ public static string CreatePackageDef(this CustomT4Host host)
11651165 return string . Format ( format ,
11661166 @namespace ,
11671167 host . TemplateInfo . OutputParentDirectory . Replace ( "_" , "." ) ,
1168- host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ,
1168+ host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ,
11691169 fullyQualifiedImport ,
11701170 methodImports ) ;
11711171 }
@@ -1175,9 +1175,9 @@ public static string CurrentNamespace(this CustomT4Host host)
11751175 switch ( host . CurrentType )
11761176 {
11771177 case OdcmType t :
1178- return t . Namespace . Name . NamespaceName ( ) ;
1178+ return t . Namespace . Name . AddPrefix ( ) ;
11791179 case OdcmProperty p :
1180- return p . Projection . Type . Namespace . Name . NamespaceName ( ) ;
1180+ return p . Projection . Type . Namespace . Name . AddPrefix ( ) ;
11811181 default :
11821182 return string . Empty ;
11831183 }
0 commit comments