CSE.Exps.MethodExp.GetTypeArray C# (CSharp) Method

GetTypeArray() private static method

Converts list of CseObject arguments into a type array using either their CompileTimeType property or if that is null, using GetType() on their Value property.
private static GetTypeArray ( List args ) : System.Type[]
args List Arguments to extract the types of
return System.Type[]
		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;
		}