コード例 #1
0
        /// <summary>Indicates the number of bytes expected for the next message.</summary>
        /// <param name="source">The stream containing the data to investigate for a length.</param>
        /// <param name="style">The algorithm used to encode the length.</param>
        /// <param name="length">The length of the message, if it could be identified.</param>
        /// <returns>True if a length could be obtained, false otherwise.</returns>
        public static bool TryReadLengthPrefix(Stream source, PrefixStyle style, out int length)
        {
            int fieldNumber, bytesRead;

            length = ProtoReader.ReadLengthPrefix(source, false, style, out fieldNumber, out bytesRead);
            return(bytesRead > 0);
        }
コード例 #2
0
        // Token: 0x06003503 RID: 13571 RVA: 0x0013328C File Offset: 0x0013168C
        public static bool TryReadLengthPrefix(Stream source, PrefixStyle style, out int length)
        {
            int num;
            int num2;

            length = ProtoReader.ReadLengthPrefix(source, false, style, out num, out num2);
            return(num2 > 0);
        }
コード例 #3
0
        /// <summary>Indicates the number of bytes expected for the next message.</summary>
        /// <param name="source">The stream containing the data to investigate for a length.</param>
        /// <param name="style">The algorithm used to encode the length.</param>
        /// <param name="length">The length of the message, if it could be identified.</param>
        /// <returns>True if a length could be obtained, false otherwise.</returns>
        public static bool TryReadLengthPrefix(Stream source, PrefixStyle style, out int length)
        {
            int fieldNumber, bytesRead;

#pragma warning disable 0618 // 32-bit
            length = ProtoReader.ReadLengthPrefix(source, false, style, out fieldNumber, out bytesRead);
#pragma warning restore 0618
            return(bytesRead > 0);
        }
コード例 #4
0
ファイル: ProtoReader.cs プロジェクト: unseen-code/tianqi_src
        public static int ReadLengthPrefix(Stream source, bool expectHeader, PrefixStyle style, out int fieldNumber)
        {
            int num;

            return(ProtoReader.ReadLengthPrefix(source, expectHeader, style, out fieldNumber, out num));
        }
コード例 #5
0
ファイル: Serializer.cs プロジェクト: x1234xx/Mystery_Stealer
 public static bool TryReadLengthPrefix(Stream source, PrefixStyle style, out int length)
 {
     length = ProtoReader.ReadLengthPrefix(source, expectHeader: false, style, out int _, out int bytesRead);
     return(bytesRead > 0);
 }