本文整理汇总了C#中Thrift.Protocol.TProtocol.WriteI16方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.WriteI16方法的具体用法?C# TProtocol.WriteI16怎么用?C# TProtocol.WriteI16使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteI16方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCSyncCharacterPropertyMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.ib) {
field.Name = "ib";
field.Type = TType.I32;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Ib);
oprot.WriteFieldEnd();
}
if (__isset.gold) {
field.Name = "gold";
field.Type = TType.I32;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Gold);
oprot.WriteFieldEnd();
}
if (__isset.level) {
field.Name = "level";
field.Type = TType.I16;
field.ID = 30;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Level);
oprot.WriteFieldEnd();
}
if (__isset.exp) {
field.Name = "exp";
field.Type = TType.I32;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Exp);
oprot.WriteFieldEnd();
}
if (__isset.power) {
field.Name = "power";
field.Type = TType.I16;
field.ID = 50;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Power);
oprot.WriteFieldEnd();
}
if (__isset.lastRecoverPowerTime) {
field.Name = "lastRecoverPowerTime";
field.Type = TType.I32;
field.ID = 51;
oprot.WriteFieldBegin(field);
oprot.WriteI32(LastRecoverPowerTime);
oprot.WriteFieldEnd();
}
if (__isset.energy) {
field.Name = "energy";
field.Type = TType.I16;
field.ID = 60;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Energy);
oprot.WriteFieldEnd();
}
if (Bit4CounterList != null && __isset.bit4CounterList) {
field.Name = "bit4CounterList";
field.Type = TType.List;
field.ID = 70;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Byte, Bit4CounterList.Count));
foreach (sbyte _iter18 in Bit4CounterList)
{
oprot.WriteByte(_iter18);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
if (Bit8CounterList != null && __isset.bit8CounterList) {
field.Name = "bit8CounterList";
field.Type = TType.List;
field.ID = 80;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Byte, Bit8CounterList.Count));
foreach (sbyte _iter19 in Bit8CounterList)
{
oprot.WriteByte(_iter19);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
if (Bit32CounterList != null && __isset.bit32CounterList) {
field.Name = "bit32CounterList";
field.Type = TType.List;
field.ID = 90;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.I32, Bit32CounterList.Count));
foreach (int _iter20 in Bit32CounterList)
{
oprot.WriteI32(_iter20);
//.........这里部分代码省略.........
示例2: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("get_partition_names_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Db_name != null && __isset.db_name)
{
field.Name = "db_name";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(Db_name);
oprot.WriteFieldEnd();
}
if (Tbl_name != null && __isset.tbl_name)
{
field.Name = "tbl_name";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(Tbl_name);
oprot.WriteFieldEnd();
}
if (__isset.max_parts)
{
field.Name = "max_parts";
field.Type = TType.I16;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Max_parts);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例3: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("ArmyMemberInfo");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.charId) {
field.Name = "charId";
field.Type = TType.I32;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteI32(CharId);
oprot.WriteFieldEnd();
}
if (Name != null && __isset.name) {
field.Name = "name";
field.Type = TType.String;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteString(Name);
oprot.WriteFieldEnd();
}
if (__isset.professionId) {
field.Name = "professionId";
field.Type = TType.I32;
field.ID = 30;
oprot.WriteFieldBegin(field);
oprot.WriteI32(ProfessionId);
oprot.WriteFieldEnd();
}
if (__isset.level) {
field.Name = "level";
field.Type = TType.I16;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Level);
oprot.WriteFieldEnd();
}
if (__isset.role) {
field.Name = "role";
field.Type = TType.Byte;
field.ID = 50;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Role);
oprot.WriteFieldEnd();
}
if (__isset.joinTime) {
field.Name = "joinTime";
field.Type = TType.I32;
field.ID = 60;
oprot.WriteFieldBegin(field);
oprot.WriteI32(JoinTime);
oprot.WriteFieldEnd();
}
if (__isset.lastOfflineTime) {
field.Name = "lastOfflineTime";
field.Type = TType.I32;
field.ID = 70;
oprot.WriteFieldBegin(field);
oprot.WriteI32(LastOfflineTime);
oprot.WriteFieldEnd();
}
if (__isset.online) {
field.Name = "online";
field.Type = TType.Bool;
field.ID = 100;
oprot.WriteFieldBegin(field);
oprot.WriteBool(Online);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例4: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("HeroEquipmentInfo");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.templateId) {
field.Name = "templateId";
field.Type = TType.I32;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteI32(TemplateId);
oprot.WriteFieldEnd();
}
if (__isset.uniqueId) {
field.Name = "uniqueId";
field.Type = TType.I64;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteI64(UniqueId);
oprot.WriteFieldEnd();
}
if (__isset.putOnUid) {
field.Name = "putOnUid";
field.Type = TType.I64;
field.ID = 30;
oprot.WriteFieldBegin(field);
oprot.WriteI64(PutOnUid);
oprot.WriteFieldEnd();
}
if (__isset.enhanceLevel) {
field.Name = "enhanceLevel";
field.Type = TType.I16;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteI16(EnhanceLevel);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例5: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CSQuickLoginMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.deviceType) {
field.Name = "deviceType";
field.Type = TType.Byte;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteByte(DeviceType);
oprot.WriteFieldEnd();
}
if (DeviceId != null && __isset.deviceId) {
field.Name = "deviceId";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(DeviceId);
oprot.WriteFieldEnd();
}
if (DeviceModel != null && __isset.deviceModel) {
field.Name = "deviceModel";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteString(DeviceModel);
oprot.WriteFieldEnd();
}
if (__isset.serverId) {
field.Name = "serverId";
field.Type = TType.I16;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteI16(ServerId);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例6: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("HeroInfo");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.templateId) {
field.Name = "templateId";
field.Type = TType.I32;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteI32(TemplateId);
oprot.WriteFieldEnd();
}
if (__isset.uniqueId) {
field.Name = "uniqueId";
field.Type = TType.I64;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteI64(UniqueId);
oprot.WriteFieldEnd();
}
if (__isset.level) {
field.Name = "level";
field.Type = TType.I16;
field.ID = 30;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Level);
oprot.WriteFieldEnd();
}
if (__isset.exp) {
field.Name = "exp";
field.Type = TType.I32;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Exp);
oprot.WriteFieldEnd();
}
if (__isset.star) {
field.Name = "star";
field.Type = TType.Byte;
field.ID = 50;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Star);
oprot.WriteFieldEnd();
}
if (__isset.quality) {
field.Name = "quality";
field.Type = TType.Byte;
field.ID = 60;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Quality);
oprot.WriteFieldEnd();
}
if (SkillInfoList != null && __isset.skillInfoList) {
field.Name = "skillInfoList";
field.Type = TType.List;
field.ID = 70;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, SkillInfoList.Count));
foreach (SkillInfo _iter3 in SkillInfoList)
{
_iter3.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
if (__isset.loyalty) {
field.Name = "loyalty";
field.Type = TType.I32;
field.ID = 100;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Loyalty);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例7: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCBuyBackItemSucc");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (ItemIndexeChanges != null && __isset.itemIndexeChanges) {
field.Name = "itemIndexeChanges";
field.Type = TType.Map;
field.ID = 1;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.I16, TType.I16, ItemIndexeChanges.Count));
foreach (short _iter17 in ItemIndexeChanges.Keys)
{
oprot.WriteI16(_iter17);
oprot.WriteI16(ItemIndexeChanges[_iter17]);
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例8: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCHeroMaxExtend");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.refreshHeroCountLimit) {
field.Name = "refreshHeroCountLimit";
field.Type = TType.I16;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI16(RefreshHeroCountLimit);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例9: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SetSceneValue_Int16_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset._sceneId) {
field.Name = "_sceneId";
field.Type = TType.Byte;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteByte(_sceneId);
oprot.WriteFieldEnd();
}
if (_valueId != null && __isset._valueId) {
field.Name = "_valueId";
field.Type = TType.Struct;
field.ID = 2;
oprot.WriteFieldBegin(field);
_valueId.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset._value) {
field.Name = "_value";
field.Type = TType.I16;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteI16(_value);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例10: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCServerListMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.id) {
field.Name = "id";
field.Type = TType.I16;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Id);
oprot.WriteFieldEnd();
}
if (ServerInfos != null && __isset.serverInfos) {
field.Name = "serverInfos";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, ServerInfos.Count));
foreach (KXSGCodec.ServerInfo _iter3 in ServerInfos)
{
_iter3.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例11: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("Resource");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Guid != null && __isset.guid) {
field.Name = "guid";
field.Type = TType.String;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteString(Guid);
oprot.WriteFieldEnd();
}
if (NoteGuid != null && __isset.noteGuid) {
field.Name = "noteGuid";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(NoteGuid);
oprot.WriteFieldEnd();
}
if (Data != null && __isset.data) {
field.Name = "data";
field.Type = TType.Struct;
field.ID = 3;
oprot.WriteFieldBegin(field);
Data.Write(oprot);
oprot.WriteFieldEnd();
}
if (Mime != null && __isset.mime) {
field.Name = "mime";
field.Type = TType.String;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteString(Mime);
oprot.WriteFieldEnd();
}
if (__isset.width) {
field.Name = "width";
field.Type = TType.I16;
field.ID = 5;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Width);
oprot.WriteFieldEnd();
}
if (__isset.height) {
field.Name = "height";
field.Type = TType.I16;
field.ID = 6;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Height);
oprot.WriteFieldEnd();
}
if (__isset.duration) {
field.Name = "duration";
field.Type = TType.I16;
field.ID = 7;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Duration);
oprot.WriteFieldEnd();
}
if (__isset.active) {
field.Name = "active";
field.Type = TType.Bool;
field.ID = 8;
oprot.WriteFieldBegin(field);
oprot.WriteBool(Active);
oprot.WriteFieldEnd();
}
if (Recognition != null && __isset.recognition) {
field.Name = "recognition";
field.Type = TType.Struct;
field.ID = 9;
oprot.WriteFieldBegin(field);
Recognition.Write(oprot);
oprot.WriteFieldEnd();
}
if (Attributes != null && __isset.attributes) {
field.Name = "attributes";
field.Type = TType.Struct;
field.ID = 11;
oprot.WriteFieldBegin(field);
Attributes.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset.updateSequenceNum) {
field.Name = "updateSequenceNum";
field.Type = TType.I32;
field.ID = 12;
oprot.WriteFieldBegin(field);
oprot.WriteI32(UpdateSequenceNum);
oprot.WriteFieldEnd();
}
if (AlternateData != null && __isset.alternateData) {
field.Name = "alternateData";
field.Type = TType.Struct;
field.ID = 13;
oprot.WriteFieldBegin(field);
AlternateData.Write(oprot);
oprot.WriteFieldEnd();
}
//.........这里部分代码省略.........
示例12: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CSEvoluteItem");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.operItemIndex) {
field.Name = "operItemIndex";
field.Type = TType.I16;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI16(OperItemIndex);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例13: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCEvoluteItemSucc");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.operItemIndex) {
field.Name = "operItemIndex";
field.Type = TType.I16;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI16(OperItemIndex);
oprot.WriteFieldEnd();
}
if (DelteItems != null && __isset.delteItems) {
field.Name = "delteItems";
field.Type = TType.Struct;
field.ID = 2;
oprot.WriteFieldBegin(field);
DelteItems.Write(oprot);
oprot.WriteFieldEnd();
}
if (EvolutedItemInfo != null && __isset.evolutedItemInfo) {
field.Name = "evolutedItemInfo";
field.Type = TType.Struct;
field.ID = 3;
oprot.WriteFieldBegin(field);
EvolutedItemInfo.Write(oprot);
oprot.WriteFieldEnd();
}
if (EvolutedItemDetail != null && __isset.evolutedItemDetail) {
field.Name = "evolutedItemDetail";
field.Type = TType.Struct;
field.ID = 4;
oprot.WriteFieldBegin(field);
EvolutedItemDetail.Write(oprot);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例14: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CSQueryItemDetail");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.bagIndex) {
field.Name = "bagIndex";
field.Type = TType.I16;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI16(BagIndex);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例15: Write
public void Write(TProtocol oprot)
{
TStruct struc = new TStruct("setReplication_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (Path != null && __isset.path) {
field.Name = "path";
field.Type = TType.Struct;
field.ID = 1;
oprot.WriteFieldBegin(field);
Path.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset.replication) {
field.Name = "replication";
field.Type = TType.I16;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteI16(Replication);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}