private string _CreateParamSignature(ParamMetadata paramInfo) { return(string.Format("{0}{1}: {2}{3};", paramInfo.name, paramInfo.isNullable ? "?" : "", paramInfo.dataType == DataType.None ? _dotNet2TS.RegisterType(paramInfo.ParameterType) : DotNet2TS.GetTSTypeNameFromDataType(paramInfo.dataType), paramInfo.dataType != DataType.None && paramInfo.isArray ? "[]" : "")); }
private string GetFieldDataType(Field fieldInfo) { var fieldName = fieldInfo.fieldName; var fieldType = "any"; var dataType = fieldInfo.dataType; fieldType = DotNet2TS.GetTSTypeNameFromDataType(dataType); return(fieldType); }
private string GetFieldDataType(Field fieldInfo) { var fieldName = fieldInfo.fieldName; var fieldType = "any"; var dataType = fieldInfo.dataType; if (fieldInfo.fieldType == FieldType.Navigation) { fieldType = fieldInfo._TypeScriptDataType; } else if (fieldInfo.fieldType == FieldType.Object) { fieldType = fieldInfo._TypeScriptDataType; } else { fieldType = DotNet2TS.GetTSTypeNameFromDataType(dataType); } return(fieldType); }