ProtocolBuffers.ProtocolParser.SkipKey C# (CSharp) Method

SkipKey() public static method

public static SkipKey ( Stream stream, Key key ) : void
stream Stream
key Key
return void
        public static void SkipKey(Stream stream, Key key)
        {
            switch (key.WireType) {
            case Wire.Fixed32:
                stream.Seek (4, SeekOrigin.Current);
                return;
            case Wire.Fixed64:
                stream.Seek (8, SeekOrigin.Current);
                return;
            case Wire.LengthDelimited:
                stream.Seek (ProtocolParser.ReadUInt32 (stream), SeekOrigin.Current);
                return;
            case Wire.Varint:
                ProtocolParser.ReadSkipVarInt (stream);
                return;
            default:
                throw new NotImplementedException ("Unknown wire type: " + key.WireType);
            }
        }