本文整理汇总了C#中FieldMap.SetField方法的典型用法代码示例。如果您正苦于以下问题:C# FieldMap.SetField方法的具体用法?C# FieldMap.SetField怎么用?C# FieldMap.SetField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FieldMap
的用法示例。
在下文中一共展示了FieldMap.SetField方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsertSendingTime
protected void InsertSendingTime(FieldMap header)
{
bool showMilliseconds = false;
if (this.SessionID.BeginString == FixValues.BeginString.FIXT11)
showMilliseconds = true;
else
showMilliseconds = this.SessionID.BeginString.CompareTo(FixValues.BeginString.FIX42) >= 0;
header.SetField(new Fields.SendingTime(System.DateTime.UtcNow, showMilliseconds && MillisecondsInTimeStamp));
}
示例2: ClearAndIsEmptyTest
public void ClearAndIsEmptyTest()
{
FieldMap fieldmap = new FieldMap();
BooleanField field = new BooleanField(200, true);
Assert.That(fieldmap.IsEmpty(), Is.EqualTo(true));
fieldmap.SetField(field);
Assert.That(fieldmap.IsEmpty(), Is.EqualTo(false));
fieldmap.Clear();
Assert.That(fieldmap.IsEmpty(), Is.EqualTo(true));
Group g = new Group(100, 101);
fieldmap.AddGroup(g);
Assert.That(fieldmap.IsEmpty(), Is.EqualTo(false));
fieldmap.Clear();
Assert.That(fieldmap.IsEmpty(), Is.EqualTo(true));
}
示例3: InsertSendingTime
protected void InsertSendingTime(FieldMap header)
{
if (this.SessionID.BeginString.CompareTo(FixValues.BeginString.FIX42) >= 0)
header.SetField(new Fields.SendingTime(System.DateTime.UtcNow));
else
header.SetField(new Fields.SendingTime(System.DateTime.UtcNow, false));
}
示例4: IsFieldSetTest
public void IsFieldSetTest()
{
FieldMap fieldmap = new FieldMap();
BooleanField field = new BooleanField(200, true);
Assert.That(fieldmap.IsSetField(field), Is.EqualTo(false));
Assert.That(fieldmap.IsSetField(field.Tag), Is.EqualTo(false));
fieldmap.SetField(field);
Assert.That(fieldmap.IsSetField(field), Is.EqualTo(true));
Assert.That(fieldmap.IsSetField(field.Tag), Is.EqualTo(true));
}
示例5: InsertOrigSendingTime
protected void InsertOrigSendingTime(FieldMap header, System.DateTime sendingTime)
{
if (this.SessionID.BeginString.CompareTo(FixValues.BeginString.FIX42) >= 0)
header.SetField(new OrigSendingTime(sendingTime));
else
header.SetField(new OrigSendingTime(sendingTime, false));
}