本文整理汇总了C#中Thrift.Protocol.TProtocol.WriteByte方法的典型用法代码示例。如果您正苦于以下问题:C# TProtocol.WriteByte方法的具体用法?C# TProtocol.WriteByte怎么用?C# TProtocol.WriteByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Thrift.Protocol.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCChatResultMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
field.Name = "result";
field.Type = TType.Byte;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Result);
oprot.WriteFieldEnd();
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例2: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SetSceneLabel_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 (_value != null && __isset._value) {
field.Name = "_value";
field.Type = TType.String;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteString(_value);
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("MissionStructInfo");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.missionId) {
field.Name = "missionId";
field.Type = TType.I32;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteI32(MissionId);
oprot.WriteFieldEnd();
}
if (__isset.missionStateEnumType) {
field.Name = "missionStateEnumType";
field.Type = TType.I32;
field.ID = 11;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)MissionStateEnumType);
oprot.WriteFieldEnd();
}
if (__isset.stepIndex) {
field.Name = "stepIndex";
field.Type = TType.Byte;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteByte(StepIndex);
oprot.WriteFieldEnd();
}
if (MissionStepStructInfo != null && __isset.missionStepStructInfo) {
field.Name = "missionStepStructInfo";
field.Type = TType.Struct;
field.ID = 30;
oprot.WriteFieldBegin(field);
MissionStepStructInfo.Write(oprot);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例5: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("GetAssociationsReturnStruct");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.retval) {
field.Name = "retval";
field.Type = TType.I32;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI32(Retval);
oprot.WriteFieldEnd();
}
if (O_associations != null && __isset.o_associations) {
field.Name = "o_associations";
field.Type = TType.List;
field.ID = 2;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Byte, O_associations.Count));
foreach (sbyte _iter23 in O_associations)
{
oprot.WriteByte(_iter23);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例6: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCCharEquipmentBringUpMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (FailSystemInfo != null && __isset.failSystemInfo) {
field.Name = "failSystemInfo";
field.Type = TType.Struct;
field.ID = 10;
oprot.WriteFieldBegin(field);
FailSystemInfo.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset.equipmentUniqueId) {
field.Name = "equipmentUniqueId";
field.Type = TType.I64;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteI64(EquipmentUniqueId);
oprot.WriteFieldEnd();
}
if (__isset.bringUpIndex) {
field.Name = "bringUpIndex";
field.Type = TType.Byte;
field.ID = 30;
oprot.WriteFieldBegin(field);
oprot.WriteByte(BringUpIndex);
oprot.WriteFieldEnd();
}
if (__isset.beginBringUpTime) {
field.Name = "beginBringUpTime";
field.Type = TType.I64;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteI64(BeginBringUpTime);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例7: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CSPreUseSkillMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.skillId) {
field.Name = "skillId";
field.Type = TType.I32;
field.ID = 10;
oprot.WriteFieldBegin(field);
oprot.WriteI32(SkillId);
oprot.WriteFieldEnd();
}
if (__isset.targetUniqueId) {
field.Name = "targetUniqueId";
field.Type = TType.I64;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteI64(TargetUniqueId);
oprot.WriteFieldEnd();
}
if (Pos != null && __isset.pos) {
field.Name = "pos";
field.Type = TType.Struct;
field.ID = 30;
oprot.WriteFieldBegin(field);
Pos.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset.hitPointCount) {
field.Name = "hitPointCount";
field.Type = TType.Byte;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteByte(HitPointCount);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例8: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CSFriendExtend");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.extendTimes) {
field.Name = "extendTimes";
field.Type = TType.Byte;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteByte(ExtendTimes);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例9: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCFriendRecieveEnergyList");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.recieveEnergyTimes) {
field.Name = "recieveEnergyTimes";
field.Type = TType.Byte;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteByte(RecieveEnergyTimes);
oprot.WriteFieldEnd();
}
if (__isset.recieveEnergyTimesLimit) {
field.Name = "recieveEnergyTimesLimit";
field.Type = TType.Byte;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteByte(RecieveEnergyTimesLimit);
oprot.WriteFieldEnd();
}
if (RecieveEnergyList != null && __isset.recieveEnergyList) {
field.Name = "recieveEnergyList";
field.Type = TType.List;
field.ID = 3;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, RecieveEnergyList.Count));
foreach (KXSGCodec.RecieveEnergyInfo _iter11 in RecieveEnergyList)
{
_iter11.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例10: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCItemDetail");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.bagType) {
field.Name = "bagType";
field.Type = TType.Byte;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteByte(BagType);
oprot.WriteFieldEnd();
}
if (__isset.bagIndex) {
field.Name = "bagIndex";
field.Type = TType.I16;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteI16(BagIndex);
oprot.WriteFieldEnd();
}
if (__isset.initSkillId) {
field.Name = "initSkillId";
field.Type = TType.I32;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteI32(InitSkillId);
oprot.WriteFieldEnd();
}
if (__isset.randSkillId) {
field.Name = "randSkillId";
field.Type = TType.I32;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteI32(RandSkillId);
oprot.WriteFieldEnd();
}
if (__isset.equipHeroImgId) {
field.Name = "equipHeroImgId";
field.Type = TType.I32;
field.ID = 5;
oprot.WriteFieldBegin(field);
oprot.WriteI32(EquipHeroImgId);
oprot.WriteFieldEnd();
}
if (MatchInfo != null && __isset.matchInfo) {
field.Name = "matchInfo";
field.Type = TType.String;
field.ID = 6;
oprot.WriteFieldBegin(field);
oprot.WriteString(MatchInfo);
oprot.WriteFieldEnd();
}
if (__isset.matchStatus) {
field.Name = "matchStatus";
field.Type = TType.Byte;
field.ID = 7;
oprot.WriteFieldBegin(field);
oprot.WriteByte(MatchStatus);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例11: Write
public void Write(TProtocol oprot) {
oprot.IncrementRecursionDepth();
try
{
TStruct struc = new TStruct("BaseMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
field.Name = "msgType";
field.Type = TType.I32;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI32((int)MsgType);
oprot.WriteFieldEnd();
if (__isset.boolVal) {
field.Name = "boolVal";
field.Type = TType.Bool;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteBool(BoolVal);
oprot.WriteFieldEnd();
}
if (__isset.byteVal) {
field.Name = "byteVal";
field.Type = TType.Byte;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteByte(ByteVal);
oprot.WriteFieldEnd();
}
if (__isset.intVal) {
field.Name = "intVal";
field.Type = TType.I32;
field.ID = 4;
oprot.WriteFieldBegin(field);
oprot.WriteI32(IntVal);
oprot.WriteFieldEnd();
}
if (__isset.doubleVal) {
field.Name = "doubleVal";
field.Type = TType.Double;
field.ID = 5;
oprot.WriteFieldBegin(field);
oprot.WriteDouble(DoubleVal);
oprot.WriteFieldEnd();
}
if (StrVal != null && __isset.strVal) {
field.Name = "strVal";
field.Type = TType.String;
field.ID = 6;
oprot.WriteFieldBegin(field);
oprot.WriteString(StrVal);
oprot.WriteFieldEnd();
}
if (ByteArrVal != null && __isset.byteArrVal) {
field.Name = "byteArrVal";
field.Type = TType.String;
field.ID = 7;
oprot.WriteFieldBegin(field);
oprot.WriteBinary(ByteArrVal);
oprot.WriteFieldEnd();
}
if (MapVal != null && __isset.mapVal) {
field.Name = "mapVal";
field.Type = TType.Map;
field.ID = 8;
oprot.WriteFieldBegin(field);
{
oprot.WriteMapBegin(new TMap(TType.Struct, TType.Struct, MapVal.Count));
foreach (BaseMsg _iter10 in MapVal.Keys)
{
_iter10.Write(oprot);
MapVal[_iter10].Write(oprot);
}
oprot.WriteMapEnd();
}
oprot.WriteFieldEnd();
}
if (ListVal != null && __isset.listVal) {
field.Name = "listVal";
field.Type = TType.List;
field.ID = 9;
oprot.WriteFieldBegin(field);
{
oprot.WriteListBegin(new TList(TType.Struct, ListVal.Count));
foreach (BaseMsg _iter11 in ListVal)
{
_iter11.Write(oprot);
}
oprot.WriteListEnd();
}
oprot.WriteFieldEnd();
}
if (SetVal != null && __isset.setVal) {
field.Name = "setVal";
field.Type = TType.Set;
field.ID = 10;
oprot.WriteFieldBegin(field);
{
oprot.WriteSetBegin(new TSet(TType.Struct, SetVal.Count));
foreach (BaseMsg _iter12 in SetVal)
//.........这里部分代码省略.........
示例12: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("TipLevel");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.level) {
field.Name = "level";
field.Type = TType.Byte;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Level);
oprot.WriteFieldEnd();
}
if (__isset.second) {
field.Name = "second";
field.Type = TType.Byte;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Second);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例13: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCArmyMemberInfoChangeMsg");
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 (__isset.online) {
field.Name = "online";
field.Type = TType.Bool;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteBool(Online);
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.role) {
field.Name = "role";
field.Type = TType.Byte;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Role);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例14: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("SCInlayGemMsg");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (FailSystemInfo != null && __isset.failSystemInfo) {
field.Name = "failSystemInfo";
field.Type = TType.Struct;
field.ID = 10;
oprot.WriteFieldBegin(field);
FailSystemInfo.Write(oprot);
oprot.WriteFieldEnd();
}
if (__isset.gemUniqueId) {
field.Name = "gemUniqueId";
field.Type = TType.I64;
field.ID = 20;
oprot.WriteFieldBegin(field);
oprot.WriteI64(GemUniqueId);
oprot.WriteFieldEnd();
}
if (__isset.equipmentUniqueId) {
field.Name = "equipmentUniqueId";
field.Type = TType.I64;
field.ID = 30;
oprot.WriteFieldBegin(field);
oprot.WriteI64(EquipmentUniqueId);
oprot.WriteFieldEnd();
}
if (__isset.holeIndex) {
field.Name = "holeIndex";
field.Type = TType.Byte;
field.ID = 40;
oprot.WriteFieldBegin(field);
oprot.WriteByte(HoleIndex);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
示例15: Write
public void Write(TProtocol oprot) {
TStruct struc = new TStruct("CSHeroChangeEquip");
oprot.WriteStructBegin(struc);
TField field = new TField();
if (__isset.heroUuid) {
field.Name = "heroUuid";
field.Type = TType.I64;
field.ID = 1;
oprot.WriteFieldBegin(field);
oprot.WriteI64(HeroUuid);
oprot.WriteFieldEnd();
}
if (__isset.index) {
field.Name = "index";
field.Type = TType.Byte;
field.ID = 2;
oprot.WriteFieldBegin(field);
oprot.WriteByte(Index);
oprot.WriteFieldEnd();
}
if (EquipUuid != null && __isset.equipUuid) {
field.Name = "equipUuid";
field.Type = TType.String;
field.ID = 3;
oprot.WriteFieldBegin(field);
oprot.WriteString(EquipUuid);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}