ZeroFormatter.swift

December 28, 2016 · View on GitHub

Build Status

Implementation of ZeroFormatter in Swift.

How to use

// TODO: Sample Code
// ...

Supported types (Stage1 only)

Primitive Format

ImplementedSwift typeC# type
oInt8SByte
oInt16
oInt32
oInt64
oUInt8Byte
oUInt16← and Char
oUInt32
oUInt64
oFloatSingle
oDouble
oBoolBoolean
oTimeSpanTimeSpan
oDateDateTime
oDateTimeOffsetDateTimeOffset
oString

Primitive Format (Optional)

ImplementedSwift typeC# type
oInt8?SByte?
oInt16?
oInt32?
oInt64?
oUInt8?Byte?
oUInt16?← and Char?
oUInt32?
oUInt64?
oFloat?Single?
oDouble?
oBool?Boolean?
oTimeSpan?TimeSpan?
oDate?DateTime?
oDateTimeOffset?DateTimeOffset?
oString?

Sequence Format

ImplementedSwift typeC# typeNote
oArray<T>?Sequence<T>if length = -1, indicates null

List Format

ImplementedSwift typeC# typeNote
oFixedSizeList<T>?FixedSizeListif length = -1, indicates null
oVariableSizeList<T>?VariableSizeListif byteSize = -1, indicates null

Object Format

ImplementedSwift typeC# typeNote
oObjectSerializable?Objectif byteSize = -1, indicates null
oStructSerializableStruct
oStructSerializable?Struct?

Union Format

ImplementedSwift typeC# typeNote
Union?Unionif byteSize = -1, indicates null