public CallbackCSharpTargetInfo(object target, string name, MethodInfo info, SupportedTransType returnType, List <PairCastInfo> argTypeList) { this.target = target; this.name = name; this.info = info; this.returnType = returnType; this.argTypeList = argTypeList; }
public static bool IsTransAbleType(Type type, out SupportedTransType result) { if (type == (typeof(void))) { result = SupportedTransType.Void; return(true); } else if (type == (typeof(bool))) { result = SupportedTransType.Boolean; return(true); } else if ( type == (typeof(byte)) || type == (typeof(sbyte)) || type == (typeof(Int16)) || type == (typeof(UInt16)) || type == (typeof(int)) || type == (typeof(uint)) ) { result = SupportedTransType.Int; return(true); } else if (type == (typeof(float)) || type == (typeof(double))) { result = SupportedTransType.Float; return(true); } else if (type == (typeof(char)) || type == (typeof(string))) { result = SupportedTransType.String; return(true); } else if (type == (typeof(bool[]))) { result = SupportedTransType.ArrayBoolean; return(true); } else if ( type == (typeof(byte[])) || type == (typeof(sbyte[])) || type == (typeof(Int16[])) || type == (typeof(UInt16[])) || type == (typeof(int[])) || type == (typeof(uint[])) ) { result = SupportedTransType.ArrayInt; return(true); } else if (type == (typeof(float[])) || type == (typeof(double[]))) { result = SupportedTransType.ArrayFloat; return(true); } else if (type == (typeof(char[])) || type == (typeof(string[]))) { result = SupportedTransType.ArrayString; return(true); } result = SupportedTransType.Void; return(false); }
public PairCastInfo(Type type, SupportedTransType stype) { this.type = type; this.stype = stype; }