public static FIXField Field(FIXType type, int tag, string value, bool invariantCulture = false) { switch (type) { case FIXType.Bool: return(new FIXBoolField(tag, value, invariantCulture)); case FIXType.Int: return(new FIXIntField(tag, value, invariantCulture)); case FIXType.Double: return(new FIXDoubleField(tag, value, invariantCulture)); case FIXType.Char: return(new FIXCharField(tag, value, invariantCulture)); case FIXType.String: return(new FIXStringField(tag, value, invariantCulture)); case FIXType.DateTime: return(new FIXDateTimeField(tag, value, invariantCulture)); default: throw new ArgumentException("Error: Unknown FIXType " + type); } }
public static FIXField Field(FIXType type, int tag) { switch (type) { case FIXType.Bool: return(new FIXBoolField(tag)); case FIXType.Int: return(new FIXIntField(tag)); case FIXType.Double: return(new FIXDoubleField(tag)); case FIXType.Char: return(new FIXCharField(tag)); case FIXType.String: return(new FIXStringField(tag)); case FIXType.DateTime: return(new FIXDateTimeField(tag)); case FIXType.NumInGroup: return(new FIXNumInGroupField(tag)); default: throw new ArgumentException("Error: Unknown FIXType " + type); } }
public static FIXField Field(FIXType type, int tag, string value, bool invariantCulture = false) { switch (type) { case FIXType.Bool: return new FIXBoolField(tag, value, invariantCulture); case FIXType.Int: return new FIXIntField(tag, value, invariantCulture); case FIXType.Double: return new FIXDoubleField(tag, value, invariantCulture); case FIXType.Char: return new FIXCharField(tag, value, invariantCulture); case FIXType.String: return new FIXStringField(tag, value, invariantCulture); case FIXType.DateTime: return new FIXDateTimeField(tag, value, invariantCulture); default: throw new ArgumentException("Error: Unknown FIXType " + type); } }
public static void ReadFrom(BinaryReader reader, FIXGroup group) { int num = reader.ReadInt32(); for (int index = 0; index < num; ++index) { int tag = reader.ReadInt32(); FIXType fixType = EFIXFieldTypes.GetFIXType(tag); switch (fixType) { case FIXType.Bool: group.AddBoolField(tag, reader.ReadBoolean()); break; case FIXType.Int: group.AddIntField(tag, reader.ReadInt32()); break; case FIXType.Double: group.AddDoubleField(tag, reader.ReadDouble()); break; case FIXType.Char: group.AddCharField(tag, reader.ReadChar()); break; case FIXType.String: group.AddStringField(tag, reader.ReadString()); break; case FIXType.DateTime: group.AddDateTimeField(tag, new DateTime(reader.ReadInt64())); break; default: throw new ArgumentException("" + fixType.ToString()); } } }
public static FIXField Field(FIXType type, int tag) { switch (type) { case FIXType.Bool: return new FIXBoolField(tag); case FIXType.Int: return new FIXIntField(tag); case FIXType.Double: return new FIXDoubleField(tag); case FIXType.Char: return new FIXCharField(tag); case FIXType.String: return new FIXStringField(tag); case FIXType.DateTime: return new FIXDateTimeField(tag); case FIXType.NumInGroup: return new FIXNumInGroupField(tag); default: throw new ArgumentException("Error: Unknown FIXType " + type); } }