/// <summary> /// Resolves the specified data type. /// </summary> /// <param name="dataType">Data type specification.</param> /// <returns>Resolved EDM Type.</returns> PrimitiveDataType IPrimitiveDataTypeVisitor <PrimitiveDataType> .Visit(FloatingPointDataType dataType) { int typeSize = dataType.GetFacetValue <TypeSizeFacet, int>(64); PrimitiveDataType result; if (!floatingPointSizesToType.TryGetValue(typeSize, out result)) { throw new TaupoNotSupportedException("Floating point data types with " + typeSize + " bits are not supported by EDM."); } return(result); }
/// <summary> /// Initializes static members of the DataTypes class. /// </summary> static DataTypes() { Integer = new IntegerDataType(); Stream = new StreamDataType(); String = new StringDataType(); Boolean = new BooleanDataType(); FixedPoint = new FixedPointDataType(); FloatingPoint = new FloatingPointDataType(); DateTime = new DateTimeDataType(); Binary = new BinaryDataType(); Guid = new GuidDataType(); TimeOfDay = new TimeOfDayDataType(); ComplexType = new ComplexDataType(); EntityType = new EntityDataType(); CollectionType = new CollectionDataType(); ReferenceType = new ReferenceDataType(); RowType = new RowDataType(); EnumType = new EnumDataType(); Spatial = new SpatialDataType(); }
IEdmPrimitiveTypeReference IPrimitiveDataTypeVisitor <IEdmPrimitiveTypeReference> .Visit(FloatingPointDataType dataType) { return(this.GetFacetlessEdmTypeReference(dataType)); }