Skip to content

Commit deaa660

Browse files
committed
Introduce MSTimeOfDate for Edm.TimeOfDay and bug fixes
1 parent b054826 commit deaa660

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

Templates/ObjC/Base/SharedObjC.template.tt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ private string GetJsonToObjCExpressionConversion(string expr,OdcmProperty prop)
105105
expr);
106106
}
107107

108+
if(GetObjCTypeIdentifier(prop,true)=="MSTimeOfDay")
109+
{
110+
return String.Format(@"[{0} ms_timeFromString: {1}]",
111+
GetObjCTypeIdentifier(prop,true),
112+
expr);
113+
}
114+
108115
if(prop.IsEnum())
109116
{
110117
return String.Format(

src/GraphODataTemplateWriter/CodeHelpers/ObjC/TypeHelperObjC.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,18 @@ public static string GetTypeString(this OdcmType type)
108108
return "NSDate";
109109
case "Date":
110110
return "MSDate";
111+
case "TimeOfDay":
112+
return "MSTimeOfDay";
111113
case "Binary":
112114
return "NSString";
113115
case "Boolean":
114116
return "BOOL";
115117
case "Stream":
116118
return "NSStream";
119+
case "Duration":
120+
return "Duration";
121+
case "NSDictionary":
122+
return "NSDictionary";
117123
default:
118124
return Prefix + type.Name.ToUpperFirstChar();
119125
}
@@ -128,7 +134,7 @@ public static bool IsComplex(this OdcmType type)
128134
{
129135
string t = GetTypeString(type);
130136
return
131-
!(t.Contains("int") || t == "BOOL" || t == "Byte" || t == "CGFloat");
137+
!(t == "int32_t" || t == "int64_t" || t == "int16_t" || t == "BOOL" || t == "Byte" || t == "CGFloat");
132138
}
133139

134140
public static bool IsComplex(this OdcmProperty property)

0 commit comments

Comments
 (0)