本文整理汇总了C#中IDataWriter类的典型用法代码示例。如果您正苦于以下问题:C# IDataWriter类的具体用法?C# IDataWriter怎么用?C# IDataWriter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IDataWriter类属于命名空间,在下文中一共展示了IDataWriter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Serialize
public override void Serialize(IDataWriter writer)
{
writer.WriteShort(msgId);
writer.WriteUInt(timeStamp);
writer.WriteUTF(owner);
writer.WriteUInt(objectGenericId);
}
示例2: DataWriterProvider
/// <summary>
/// Ctor
/// </summary>
/// <param name="writers">inject with all possible writers</param>
public DataWriterProvider(IEnumerable<IDataWriter> writers)
{
if (writers != null)
{
foreach (IDataWriter writer in writers)
{
if (this.DefaultWriter == null)
{
// TODO: decide less arbitrary way to choose default
// without hardcoding value into IDataWriter
this.DefaultWriter = writer;
}
if (!String.IsNullOrEmpty(writer.ContentType))
{
this.WritersByMime[writer.ContentType] = writer;
}
if (!String.IsNullOrEmpty(writer.ContentType))
{
string ext = DataWriterProvider.NormalizeExtension(writer.FileExtension);
this.WritersByExt[ext] = writer;
}
}
}
}
示例3: Serialize
public override void Serialize(IDataWriter writer)
{
base.Serialize(writer);
writer.WriteInt(mountId);
writer.WriteDouble(date);
writer.WriteShort(modelId);
}
示例4: Serialize
public override void Serialize(IDataWriter writer)
{
writer.WriteInt(casterId);
writer.WriteShort(targetCellId);
writer.WriteShort(spellId);
writer.WriteSByte(spellLevel);
}
示例5: Serialize
public override void Serialize(IDataWriter writer)
{
writer.WriteInt(fightId);
writer.WriteInt(sourceId);
writer.WriteInt(targetId);
writer.WriteBoolean(accept);
}
示例6: Serialize
public override void Serialize(IDataWriter writer)
{
base.Serialize(writer);
writer.WriteUTF(name);
writer.WriteInt(id);
writer.WriteSByte(relationType);
}
示例7: Serialize
public override void Serialize(IDataWriter writer)
{
writer.WriteUTF(name);
writer.WriteShort(worldX);
writer.WriteShort(worldY);
writer.WriteUTF(ownername);
}
示例8: Serialize
public virtual void Serialize(IDataWriter writer)
{
writer.WriteShort(cellId);
writer.WriteSByte(zoneSize);
writer.WriteInt(cellColor);
writer.WriteSByte(cellsType);
}
示例9: Serialize
public virtual void Serialize(IDataWriter writer)
{
writer.WriteShort(@base);
writer.WriteShort(objectsAndMountBonus);
writer.WriteShort(alignGiftBonus);
writer.WriteShort(contextModif);
}
示例10: Serialize
public override void Serialize(IDataWriter writer)
{
writer.WriteInt(areaId);
writer.WriteSByte(atLeastNbMount);
writer.WriteSByte(atLeastNbMachine);
writer.WriteInt(maxPrice);
}
示例11: Serialize
public virtual void Serialize(IDataWriter writer)
{
writer.WriteShort(actionId);
writer.WriteInt(sourceId);
writer.WriteShort(effect.TypeId);
effect.Serialize(writer);
}
示例12: Serialize
public override void Serialize(IDataWriter writer)
{
writer.WriteSByte(paymentType);
writer.WriteBoolean(bAdd);
writer.WriteInt(objectToMoveId);
writer.WriteInt(quantity);
}
示例13: SetUp
public void SetUp()
{
mock=new MockRepository();
dataWriter = mock.DynamicMock<IDataWriter>();
dataReader = mock.Stub<IDataReader>();
randomSecret = mock.Stub<IRandomSecret>();
}
示例14: Serialize
public override void Serialize(IDataWriter writer)
{
base.Serialize(writer);
writer.WriteShort(firstNameId);
writer.WriteShort(lastNameId);
writer.WriteShort(level);
}
示例15: Serialize
public override void Serialize(IDataWriter writer)
{
base.Serialize(writer);
writer.WriteInt(targetId);
writer.WriteInt(spellId);
writer.WriteShort(value);
}