public static GetFactoryInfoRequest DeserializeLengthDelimited(Stream stream)
        {
            GetFactoryInfoRequest getFactoryInfoRequest = new GetFactoryInfoRequest();

            GetFactoryInfoRequest.DeserializeLengthDelimited(stream, getFactoryInfoRequest);
            return(getFactoryInfoRequest);
        }
        public static GetFactoryInfoRequest DeserializeLengthDelimited(Stream stream, GetFactoryInfoRequest instance)
        {
            long num = (long)((ulong)ProtocolParser.ReadUInt32(stream));

            num += stream.Position;
            return(GetFactoryInfoRequest.Deserialize(stream, instance, num));
        }
        public static void Serialize(Stream stream, GetFactoryInfoRequest instance)
        {
            BinaryWriter binaryWriter = new BinaryWriter(stream);

            stream.WriteByte(9);
            binaryWriter.Write(instance.FactoryId);
        }
예제 #4
0
        public override bool Equals(object obj)
        {
            GetFactoryInfoRequest getFactoryInfoRequest = obj as GetFactoryInfoRequest;

            if (getFactoryInfoRequest == null)
            {
                return(false);
            }
            if (!this.FactoryId.Equals(getFactoryInfoRequest.FactoryId))
            {
                return(false);
            }
            return(true);
        }
예제 #5
0
        public static GetFactoryInfoRequest Deserialize(Stream stream, GetFactoryInfoRequest instance, long limit)
        {
            BinaryReader binaryReader = new BinaryReader(stream);

            while (true)
            {
                if (limit < (long)0 || stream.Position < limit)
                {
                    int num = stream.ReadByte();
                    if (num == -1)
                    {
                        if (limit >= (long)0)
                        {
                            throw new EndOfStreamException();
                        }
                        break;
                    }
                    else if (num == 9)
                    {
                        instance.FactoryId = binaryReader.ReadUInt64();
                    }
                    else
                    {
                        Key key = ProtocolParser.ReadKey((byte)num, stream);
                        if (key.Field == 0)
                        {
                            throw new ProtocolBufferException("Invalid field id: 0, something went wrong in the stream");
                        }
                        ProtocolParser.SkipKey(stream, key);
                    }
                }
                else
                {
                    if (stream.Position != limit)
                    {
                        throw new ProtocolBufferException("Read past max limit");
                    }
                    break;
                }
            }
            return(instance);
        }
        public static GetFactoryInfoRequest Deserialize(Stream stream, GetFactoryInfoRequest instance, long limit)
        {
            BinaryReader binaryReader = new BinaryReader(stream);

            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 != 9)
                    {
                        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.FactoryId = binaryReader.ReadUInt64();
                    }
                }
            }
            if (stream.get_Position() == limit)
            {
                return(instance);
            }
            throw new ProtocolBufferException("Read past max limit");
        }
 public static GetFactoryInfoRequest Deserialize(Stream stream, GetFactoryInfoRequest instance)
 {
     return(GetFactoryInfoRequest.Deserialize(stream, instance, -1L));
 }
 public void Deserialize(Stream stream)
 {
     GetFactoryInfoRequest.Deserialize(stream, this);
 }
        public override bool Equals(object obj)
        {
            GetFactoryInfoRequest getFactoryInfoRequest = obj as GetFactoryInfoRequest;

            return(getFactoryInfoRequest != null && this.FactoryId.Equals(getFactoryInfoRequest.FactoryId));
        }