예제 #1
0
 public override void GetChannelInfo(Google.ProtocolBuffers.IRpcController controller, bnet.protocol.channel.GetChannelInfoRequest request, Action <bnet.protocol.channel.GetChannelInfoResponse> done)
 {
     throw new NotImplementedException();
 }
 public void Deserialize(Stream stream)
 {
     GetChannelInfoRequest.Deserialize(stream, this);
 }
예제 #3
0
 public static GetChannelInfoRequest Deserialize(Stream stream, GetChannelInfoRequest instance, long limit)
 {
     instance.FetchState   = false;
     instance.FetchMembers = false;
     while (limit < 0L || stream.get_Position() < limit)
     {
         int num = stream.ReadByte();
         if (num == -1)
         {
             if (limit >= 0L)
             {
                 throw new EndOfStreamException();
             }
             return(instance);
         }
         else
         {
             int num2 = num;
             if (num2 != 10)
             {
                 if (num2 != 18)
                 {
                     if (num2 != 24)
                     {
                         if (num2 != 32)
                         {
                             Key  key   = ProtocolParser.ReadKey((byte)num, stream);
                             uint field = key.Field;
                             if (field == 0u)
                             {
                                 throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream");
                             }
                             ProtocolParser.SkipKey(stream, key);
                         }
                         else
                         {
                             instance.FetchMembers = ProtocolParser.ReadBool(stream);
                         }
                     }
                     else
                     {
                         instance.FetchState = ProtocolParser.ReadBool(stream);
                     }
                 }
                 else if (instance.ChannelId == null)
                 {
                     instance.ChannelId = EntityId.DeserializeLengthDelimited(stream);
                 }
                 else
                 {
                     EntityId.DeserializeLengthDelimited(stream, instance.ChannelId);
                 }
             }
             else if (instance.AgentId == null)
             {
                 instance.AgentId = EntityId.DeserializeLengthDelimited(stream);
             }
             else
             {
                 EntityId.DeserializeLengthDelimited(stream, instance.AgentId);
             }
         }
     }
     if (stream.get_Position() == limit)
     {
         return(instance);
     }
     throw new ProtocolBufferException("Read past max limit");
 }
예제 #4
0
        public static GetChannelInfoRequest DeserializeLengthDelimited(Stream stream, GetChannelInfoRequest instance)
        {
            long num = (long)((ulong)ProtocolParser.ReadUInt32(stream));

            num += stream.get_Position();
            return(GetChannelInfoRequest.Deserialize(stream, instance, num));
        }
예제 #5
0
 public static GetChannelInfoRequest Deserialize(Stream stream, GetChannelInfoRequest instance)
 {
     return(GetChannelInfoRequest.Deserialize(stream, instance, -1L));
 }
예제 #6
0
        public override bool Equals(object obj)
        {
            GetChannelInfoRequest getChannelInfoRequest = obj as GetChannelInfoRequest;

            return(getChannelInfoRequest != null && this.HasAgentId == getChannelInfoRequest.HasAgentId && (!this.HasAgentId || this.AgentId.Equals(getChannelInfoRequest.AgentId)) && this.ChannelId.Equals(getChannelInfoRequest.ChannelId) && this.HasFetchState == getChannelInfoRequest.HasFetchState && (!this.HasFetchState || this.FetchState.Equals(getChannelInfoRequest.FetchState)) && this.HasFetchMembers == getChannelInfoRequest.HasFetchMembers && (!this.HasFetchMembers || this.FetchMembers.Equals(getChannelInfoRequest.FetchMembers)));
        }
예제 #7
0
        public static GetChannelInfoRequest DeserializeLengthDelimited(Stream stream, GetChannelInfoRequest instance)
        {
            long position = (long)ProtocolParser.ReadUInt32(stream);

            position += stream.Position;
            return(GetChannelInfoRequest.Deserialize(stream, instance, position));
        }