private static Type[] GetTypeArray(List<CseObject> args) {
if (args == null)
return null;
Type[] types = new Type[args.Count];
for (int i = 0; i < args.Count; i++) {
if (args[i].CompileTimeType == null) {
if (args[i].Value == null) {
types[i] = null;
}
else {
if (args[i].CallMod == CallArgMod.OUT || args[i].CallMod == CallArgMod.REF) {
types[i] = args[i].Value.GetType().MakeByRefType();
}
else {
types[i] = args[i].Value.GetType();
}
}
}
else {
if (args[i].CallMod == CallArgMod.OUT || args[i].CallMod == CallArgMod.REF) {
types[i] = args[i].CompileTimeType.MakeByRefType();
}
else {
types[i] = args[i].CompileTimeType;
}
}
}
return types;
}