ReadInt16() публичный Метод

public ReadInt16 ( ) : short
Результат short
Пример #1
0
 internal override bool ReadTag(NbtBinaryReader readStream)
 {
     if (readStream.Selector != null && !readStream.Selector(this)) {
         readStream.ReadInt16();
         return false;
     }
     Value = readStream.ReadInt16();
     return true;
 }
Пример #2
0
 internal override bool ReadTag(NbtBinaryReader readStream)
 {
     if (readStream.Selector != null && !readStream.Selector(this))
     {
         readStream.ReadInt16();
         return(false);
     }
     Value = readStream.ReadInt16();
     return(true);
 }
Пример #3
0
        void SkipValue()
        {
            // Make sure to check for "atValue" before calling this method
            switch (TagType)
            {
            case NbtTagType.Byte:
                reader.ReadByte();
                break;

            case NbtTagType.Short:
                reader.ReadInt16();
                break;

            case NbtTagType.Float:
            case NbtTagType.Int:
                reader.ReadInt32();
                break;

            case NbtTagType.Double:
            case NbtTagType.Long:
                reader.ReadInt64();
                break;

            case NbtTagType.ByteArray:
                reader.Skip(TagLength);
                break;

            case NbtTagType.IntArray:
                reader.Skip(sizeof(int) * TagLength);
                break;

            case NbtTagType.LongArray:
                reader.Skip(sizeof(long) * TagLength);
                break;

            case NbtTagType.String:
                reader.SkipString();
                break;

            default:
                throw new InvalidOperationException(NonValueTagError);
            }
            atValue    = false;
            valueCache = null;
        }
Пример #4
0
        void SkipValue()
        {
            if (!atValue)
            {
                throw new NbtFormatException(NoValueToReadError);
            }
            switch (TagType)
            {
            case NbtTagType.Byte:
                reader.ReadByte();
                break;

            case NbtTagType.Short:
                reader.ReadInt16();
                break;

            case NbtTagType.Float:
            case NbtTagType.Int:
                reader.ReadInt32();
                break;

            case NbtTagType.Double:
            case NbtTagType.Long:
                reader.ReadInt64();
                break;

            case NbtTagType.ByteArray:
                reader.Skip(TagLength);
                break;

            case NbtTagType.IntArray:
                reader.Skip(sizeof(int) * TagLength);
                break;

            case NbtTagType.String:
                reader.SkipString();
                break;

            default:
                throw new InvalidOperationException(NonValueTagError);
            }
            atValue    = false;
            valueCache = null;
        }
Пример #5
0
 internal override void SkipTag(NbtBinaryReader readStream)
 {
     readStream.ReadInt16();
 }
Пример #6
0
 internal override void SkipTag(NbtBinaryReader readStream)
 {
     readStream.ReadInt16();
 }
Пример #7
0
 internal override void ReadTag(NbtBinaryReader readStream)
 {
     Value = readStream.ReadInt16();
 }