DataVersion

public class DataVersion

Constant codes to represent OData versions.

  • Constant code for OData version 1.0.

    Declaration

    Swift

    public static let ODATA_V1: Int = (100 as Int)
  • Constant code for OData version 2.0.

    Declaration

    Swift

    public static let ODATA_V2: Int = (200 as Int)
  • Constant code for OData version 3.0.

    Declaration

    Swift

    public static let ODATA_V3: Int = (300 as Int)
  • Constant code for OData version 4.0.

    Declaration

    Swift

    public static let ODATA_V4: Int = (400 as Int)
  • Declaration

    Swift

    public static func asText(version: Int) -> String

    Parameters

    version

    Version number, e.g. 400.

    Return Value

    Version string, e.g. 4.0.

  • Parse a version string to a version number.

    Declaration

    Swift

    public static func parse(version: String) -> Int

    Parameters

    version

    Version number in text form, e.g. 4.0.

    Return Value

    Version number, e.g. 400.