private static OdcmType PrimitiveOdcmType(Action<OdcmType> config = null) { var retVal = new OdcmPrimitiveType("String", Vipr.Core.CodeModel.OdcmNamespace.Edm); if (config != null) config(retVal); return retVal; }
private static OdcmPrimitiveType EnumUnderlyingType(Action<OdcmPrimitiveType> config = null) { List<string> underlyingTypes = new List<string>() { "Byte", "SByte", "Int16", "Int32", "Int64" }; var retVal = new OdcmPrimitiveType(underlyingTypes.RandomElement(), Vipr.Core.CodeModel.OdcmNamespace.Edm); if (config != null) config(retVal); return retVal; }
public static string GetPrimitiveTypeKeyword(OdcmPrimitiveType odcmType) { switch (odcmType.Name) { case "Byte": return "byte"; case "SByte": return "sbyte"; case "Int16": return "short"; case "UInt16": return "ushort"; case "Int32": return "int"; case "UInt32": return "uint"; case "Int64": return "long"; case "UInt64": return "ulong"; } return null; }