/// <summary> /// Given a Fantom qname, get the .NET implementation class name: /// </summary> public static string toDotnetImplTypeName(string podName, string typeName) { if (podName == "sys") { switch (typeName[0]) { case 'B': if (typeName == "Bool") { return("Fan.Sys.FanBool"); } break; case 'D': if (typeName == "Decimal") { return("Fan.Sys.FanDecimal"); } break; case 'F': if (typeName == "Float") { return("Fan.Sys.FanFloat"); } break; case 'I': if (typeName == "Int") { return("Fan.Sys.FanInt"); } break; case 'N': if (typeName == "Num") { return("Fan.Sys.FanNum"); } break; case 'O': if (typeName == "Obj") { return("Fan.Sys.FanObj"); } break; case 'S': if (typeName == "Str") { return("Fan.Sys.FanStr"); } break; } } return("Fan." + FanUtil.upper(podName, false) + "." + typeName); }
/// <summary> /// Return the .NET type name for this Fantom pod and type. /// </summary> public static string toDotnetTypeName(string podName, string typeName, bool nullable) { if (podName == "sys") { switch (typeName[0]) { case 'B': if (typeName == "Bool") { return(nullable ? "Fan.Sys.Boolean" : "System.Boolean"); } break; case 'D': if (typeName == "Decimal") { return("Fan.Sys.BigDecimal"); } break; case 'F': if (typeName == "Float") { return(nullable ? "Fan.Sys.Double" : "System.Double"); } break; case 'I': if (typeName == "Int") { return(nullable ? "Fan.Sys.Long" : "System.Int64"); } break; case 'N': if (typeName == "Num") { return("Fan.Sys.Number"); } break; case 'O': if (typeName == "Obj") { return("System.Object"); } break; case 'S': if (typeName == "Str") { return("System.String"); } break; //case 'V': // if (typeName.equals("Void")) return "System.Void"; // break; } } return("Fan." + FanUtil.upper(podName, false) + "." + typeName); }