Ejemplo n.º 1
0
        public EndianStream StreamSignature(ulong signature)
        {
            if (IsReading)
            {
                SignatureMismatchException.Assert(Reader, signature);
            }
            else if (IsWriting)
            {
                Writer.Write(signature);
            }

            return(this);
        }
Ejemplo n.º 2
0
        public EndianStream StreamSignature(string signature, Memory.Strings.StringStorage storage)
        {
            Contract.Requires(!string.IsNullOrEmpty(signature));

            if (IsReading)
            {
                SignatureMismatchException.Assert(Reader, signature, storage);
            }
            else if (IsWriting)
            {
                Writer.Write(signature, storage);
            }

            return(this);
        }
Ejemplo n.º 3
0
        public EndianStream StreamSignature(string signature, Text.StringStorageEncoding encoding)
        {
            Contract.Requires(!string.IsNullOrEmpty(signature));
            Contract.Requires(encoding != null);

            if (IsReading)
            {
                SignatureMismatchException.Assert(Reader, signature, encoding);
            }
            else if (IsWriting)
            {
                Writer.Write(signature, encoding);
            }

            return(this);
        }