本文整理汇总了C#中LittleEndianOutput.WriteLong方法的典型用法代码示例。如果您正苦于以下问题:C# LittleEndianOutput.WriteLong方法的具体用法?C# LittleEndianOutput.WriteLong怎么用?C# LittleEndianOutput.WriteLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LittleEndianOutput
的用法示例。
在下文中一共展示了LittleEndianOutput.WriteLong方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize(LittleEndianOutput out1)
{
out1.WriteShort(rt);
out1.WriteShort(grbitFrt);
out1.WriteInt(0);
out1.WriteInt(0);
cb = this.DataSize;
out1.WriteInt(cb);
out1.WriteShort(optionflag);
out1.WriteShort(0);
if (cb == 0x28)
{
out1.WriteShort(optionflag2);
out1.WriteInt(xclrType);
out1.WriteInt(xclrValue);
out1.WriteLong(numTint);
out1.WriteShort(0);
}
}
示例2: Serialize
public override void Serialize(LittleEndianOutput out1)
{
int field_4_name_length = field_6_name_text.Length;
int field_5_comment_length = field_7_comment_text.Length;
out1.WriteShort(field_1_record_type);
out1.WriteShort(field_2_frt_cell_ref_flag);
out1.WriteLong(field_3_reserved);
out1.WriteShort(field_4_name_length);
out1.WriteShort(field_5_comment_length);
out1.WriteByte(0);
out1.Write(Encoding.UTF8.GetBytes(field_6_name_text));
out1.WriteByte(0);
out1.Write(Encoding.UTF8.GetBytes(field_7_comment_text));
}
示例3: Serialize
public void Serialize(LittleEndianOutput out1) {
out1.WriteInt(_d1);
out1.WriteShort(_d2);
out1.WriteShort(_d3);
out1.WriteLong(_d4);
}
示例4: Serialize
public int Serialize(LittleEndianOutput out1)
{
out1.WriteByte((byte)vt);
switch (vt)
{
case DOPERType.RKNumber:
out1.WriteByte(grbitSgn);
_RK.Serialize(out1);
out1.WriteInt(0); //reserved
break;
case DOPERType.IEEENumber:
out1.WriteByte(grbitSgn);
out1.WriteDouble(_IEEENumber);
break;
case DOPERType.String:
out1.WriteByte(grbitSgn);
out1.WriteInt(0); //reserved
out1.WriteByte(CCH);
out1.WriteByte(0); //reserved
out1.WriteShort(0); //reserved
break;
case DOPERType.BooleanOrErrors:
out1.WriteByte(grbitSgn);
out1.WriteByte(fError);
out1.WriteByte(bBoolErr);
out1.WriteShort(0); //reserved
out1.WriteInt(0); //reserved
break;
default: //FilterCondition,MatchAllBlanks,MatchNoneBlank
out1.WriteByte(0); //reserved
out1.WriteLong(0); //reserved
break;
}
return this.RecordSize;
}
示例5: EncodeSingleValue
private static void EncodeSingleValue(LittleEndianOutput out1, Object value)
{
if (value == EMPTY_REPRESENTATION)
{
out1.WriteByte(TYPE_EMPTY);
out1.WriteLong(0L);
return;
}
if (value is bool)
{
bool bVal = ((bool)value);
out1.WriteByte(TYPE_BOOLEAN);
long longVal = bVal ? 1L : 0L;
out1.WriteLong(longVal);
return;
}
if (value is double)
{
double dVal = (double)value;
out1.WriteByte(TYPE_NUMBER);
out1.WriteDouble(dVal);
return;
}
if (value is String)
{
String val = (String)value;
out1.WriteByte(TYPE_STRING);
StringUtil.WriteUnicodeString(out1, val);
return;
}
if (value is ErrorConstant)
{
ErrorConstant ecVal = (ErrorConstant)value;
out1.WriteByte(TYPE_ERROR_CODE);
long longVal = ecVal.ErrorCode;
out1.WriteLong(longVal);
return;
}
throw new Exception("Unexpected value type (" + value.GetType().Name + "'");
}