@@ -608,7 +608,7 @@ public static string MethodParametersJavadocSignature(this OdcmMethod method)
608
608
return parameterSignatureBuilder . ToString ( ) ;
609
609
}
610
610
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 ( ) ;
612
612
613
613
public static string MethodParametersSignature ( this OdcmMethod method )
614
614
{
@@ -861,7 +861,7 @@ public static StringBuilder ImportClassesOfMethodParameters(OdcmMethod method, s
861
861
appendEnumSet = true ;
862
862
}
863
863
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 ) ) ;
865
865
}
866
866
}
867
867
@@ -1017,7 +1017,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1017
1017
import {0}.http.*;
1018
1018
import {0}.serializer.*;
1019
1019
import java.util.Arrays;
1020
- import java.util.EnumSet;" , host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ) ;
1020
+ import java.util.EnumSet;" , host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ) ;
1021
1021
1022
1022
sb . Append ( "\n " ) ;
1023
1023
var importFormat = @"import {0}.{1}.{2};" ;
@@ -1037,7 +1037,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1037
1037
1038
1038
string prefixValue = property . GetPackagePrefix ( ) ;
1039
1039
string importstr = String . Format ( importFormat ,
1040
- property . Projection . Type . Namespace . Name . NamespaceName ( ) ,
1040
+ property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
1041
1041
prefixValue ,
1042
1042
propertyType ) ;
1043
1043
if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1054,7 +1054,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1054
1054
{
1055
1055
string prefixValue = GetPrefixForModels ( ) ;
1056
1056
string importstr = String . Format ( importFormat ,
1057
- ( host . CurrentType . BaseClass ( ) as OdcmClass ) . Namespace . Name . NamespaceName ( ) ,
1057
+ ( host . CurrentType . BaseClass ( ) as OdcmClass ) . Namespace . Name . AddPrefix ( ) ,
1058
1058
prefixValue ,
1059
1059
baseClassNameType ) ;
1060
1060
if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1069,7 +1069,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1069
1069
if ( baseTypeNameStr == "BasePlannerAssignments" )
1070
1070
{
1071
1071
string importstr = String . Format ( importFormat ,
1072
- host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ,
1072
+ host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ,
1073
1073
"models.extensions" ,
1074
1074
"PlannerAssignment" ) ;
1075
1075
if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1082,7 +1082,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1082
1082
if ( baseTypeNameStr == "BasePlannerChecklistItems" )
1083
1083
{
1084
1084
string importstr = String . Format ( importFormat ,
1085
- host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ,
1085
+ host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ,
1086
1086
"models.extensions" ,
1087
1087
"PlannerChecklistItem" ) ;
1088
1088
if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1102,7 +1102,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1102
1102
1103
1103
var propertyType = TypeCollectionResponse ( property ) ;
1104
1104
string importstr = String . Format ( importFormat ,
1105
- property . Projection . Type . Namespace . Name . NamespaceName ( ) ,
1105
+ property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
1106
1106
GetPrefixForRequests ( ) ,
1107
1107
propertyType ) ;
1108
1108
if ( ! uniqueStore . ContainsKey ( importstr ) )
@@ -1114,7 +1114,7 @@ public static string CreatePackageDefForEntity(this CustomT4Host host)
1114
1114
1115
1115
string propertyValue = TypeCollectionPage ( property ) ;
1116
1116
string importstr1 = String . Format ( importFormat ,
1117
- property . Projection . Type . Namespace . Name . NamespaceName ( ) ,
1117
+ property . Projection . Type . Namespace . Name . AddPrefix ( ) ,
1118
1118
GetPrefixForRequests ( ) ,
1119
1119
propertyValue ) ;
1120
1120
if ( ! uniqueStore . ContainsKey ( importstr1 ) )
@@ -1151,7 +1151,7 @@ public static string CreatePackageDef(this CustomT4Host host)
1151
1151
switch ( host . CurrentType )
1152
1152
{
1153
1153
case OdcmProperty p :
1154
- @namespace = p . Type . Namespace . Name . NamespaceName ( ) ;
1154
+ @namespace = p . Type . Namespace . Name . AddPrefix ( ) ;
1155
1155
break ;
1156
1156
case OdcmMethod m :
1157
1157
var sb = new StringBuilder ( Environment . NewLine ) ;
@@ -1165,7 +1165,7 @@ public static string CreatePackageDef(this CustomT4Host host)
1165
1165
return string . Format ( format ,
1166
1166
@namespace ,
1167
1167
host . TemplateInfo . OutputParentDirectory . Replace ( "_" , "." ) ,
1168
- host . CurrentModel . GetNamespace ( ) . NamespaceName ( ) ,
1168
+ host . CurrentModel . GetNamespace ( ) . AddPrefix ( ) ,
1169
1169
fullyQualifiedImport ,
1170
1170
methodImports ) ;
1171
1171
}
@@ -1175,9 +1175,9 @@ public static string CurrentNamespace(this CustomT4Host host)
1175
1175
switch ( host . CurrentType )
1176
1176
{
1177
1177
case OdcmType t :
1178
- return t . Namespace . Name . NamespaceName ( ) ;
1178
+ return t . Namespace . Name . AddPrefix ( ) ;
1179
1179
case OdcmProperty p :
1180
- return p . Projection . Type . Namespace . Name . NamespaceName ( ) ;
1180
+ return p . Projection . Type . Namespace . Name . AddPrefix ( ) ;
1181
1181
default :
1182
1182
return string . Empty ;
1183
1183
}
0 commit comments