Skip to content

Commit 54b12c1

Browse files
author
Brian Melton
committed
wip - fixing param / return types for Edm.Stream
1 parent 3c74826 commit 54b12c1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Templates/Android/BaseModel.template.tt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,23 @@
376376

377377
/// The Type of this param, as a string
378378
public string ParamType(OdcmParameter c) {
379+
var typeString = c.Type.GetTypeString();
379380
if (c.IsCollection){
380-
return String.Format("List<{0}>", c.Type.GetTypeString());
381+
typeString = String.Format("List<{0}>", c.Type.GetTypeString());
382+
} else if (typeString.Equals("Stream")) {
383+
typeString = "byte[]";
381384
}
382-
return c.Type.GetTypeString();
385+
return typeString;
383386
}
384387

385388
public string ReturnType(OdcmObject c) {
386389
var returnType = c.AsOdcmMethod().ReturnType;
387390
if (returnType != null) {
388-
return returnType.GetTypeString();
391+
var returnTypeString = returnType.GetTypeString();
392+
if (returnTypeString.Equals("Stream")) {
393+
returnTypeString = "InputStream";
394+
}
395+
return returnTypeString;
389396
}
390397
return "Void";
391398
}

0 commit comments

Comments
 (0)