public override int SerializedSize() { int size = memoizedSerializedSize; if (size != -1) { return(size); } size = 0; if (HasOperate) { size += pb::CodedOutputStream.ComputeInt32Size(1, Operate); } { foreach (ActivityRankInfo element in chargeRanksList) { int subsize = element.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)2) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } } { foreach (ActivityRankInfo element in spendRanksList) { int subsize = element.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)3) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } } { int subsize = PlayerCharge.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)4) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } { int subsize = PlayerSpend.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)5) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } { foreach (ActivityRankReward element in chargeRewardsList) { int subsize = element.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)6) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } } { foreach (ActivityRankReward element in spendRewardsList) { int subsize = element.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)7) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } } if (HasType) { size += pb::CodedOutputStream.ComputeInt32Size(8, Type); } memoizedSerializedSize = size; return(size); }
//end merged public override bool IsInitialized() { foreach (ActivityRankInfo element in chargeRanksList) { if (!element.IsInitialized()) { return(false); } } foreach (ActivityRankInfo element in spendRanksList) { if (!element.IsInitialized()) { return(false); } } if (HasPlayerCharge) { if (!PlayerCharge.IsInitialized()) { return(false); } } if (HasPlayerSpend) { if (!PlayerSpend.IsInitialized()) { return(false); } } foreach (ActivityRankReward element in chargeRewardsList) { if (!element.IsInitialized()) { return(false); } } foreach (ActivityRankReward element in spendRewardsList) { if (!element.IsInitialized()) { return(false); } } return(true); }
public override void WriteTo(pb::CodedOutputStream output) { int size = SerializedSize(); if (HasOperate) { output.WriteInt32(1, Operate); } do { foreach (ActivityRankInfo element in chargeRanksList) { output.WriteTag((int)2, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)element.SerializedSize()); element.WriteTo(output); } }while(false); do { foreach (ActivityRankInfo element in spendRanksList) { output.WriteTag((int)3, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)element.SerializedSize()); element.WriteTo(output); } }while(false); { output.WriteTag((int)4, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)PlayerCharge.SerializedSize()); PlayerCharge.WriteTo(output); } { output.WriteTag((int)5, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)PlayerSpend.SerializedSize()); PlayerSpend.WriteTo(output); } do { foreach (ActivityRankReward element in chargeRewardsList) { output.WriteTag((int)6, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)element.SerializedSize()); element.WriteTo(output); } }while(false); do { foreach (ActivityRankReward element in spendRewardsList) { output.WriteTag((int)7, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)element.SerializedSize()); element.WriteTo(output); } }while(false); if (HasType) { output.WriteInt32(8, Type); } }