Preserve BinaryReader
and StreamReader
.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UnityEngine.Scripting;
|
using UnityEngine.Scripting;
|
||||||
|
|
||||||
@@ -51,10 +52,49 @@ namespace Cryville.Crtr.Extension {
|
|||||||
p.TakeWhile(i => false);
|
p.TakeWhile(i => false);
|
||||||
p.TakeWhile((i, j) => false);
|
p.TakeWhile((i, j) => false);
|
||||||
p.ToArray();
|
p.ToArray();
|
||||||
|
p.ToDictionary(i => new object());
|
||||||
|
p.ToDictionary(i => new object(), i => new object());
|
||||||
p.ToHashSet();
|
p.ToHashSet();
|
||||||
p.ToList();
|
p.ToList();
|
||||||
p.Where(i => false);
|
p.Where(i => false);
|
||||||
p.Where((i, j) => false);
|
p.Where((i, j) => false);
|
||||||
}
|
}
|
||||||
|
[Preserve]
|
||||||
|
public static void PreserveBinaryReader() {
|
||||||
|
BinaryReader p = new BinaryReader(null);
|
||||||
|
p.Close();
|
||||||
|
p.Dispose();
|
||||||
|
p.PeekChar();
|
||||||
|
p.Read();
|
||||||
|
p.ReadBoolean();
|
||||||
|
p.ReadByte();
|
||||||
|
p.ReadBytes(0);
|
||||||
|
p.ReadChar();
|
||||||
|
p.ReadChars(0);
|
||||||
|
p.ReadDouble();
|
||||||
|
p.ReadInt16();
|
||||||
|
p.ReadInt32();
|
||||||
|
p.ReadInt64();
|
||||||
|
p.ReadSByte();
|
||||||
|
p.ReadSingle();
|
||||||
|
p.ReadUInt16();
|
||||||
|
p.ReadUInt32();
|
||||||
|
p.ReadUInt64();
|
||||||
|
}
|
||||||
|
[Preserve]
|
||||||
|
public static void PreserveStreamReader() {
|
||||||
|
object _;
|
||||||
|
StreamReader p = new StreamReader((Stream)null);
|
||||||
|
p.Close();
|
||||||
|
_ = p.CurrentEncoding;
|
||||||
|
p.DiscardBufferedData();
|
||||||
|
p.Dispose();
|
||||||
|
_ = p.EndOfStream;
|
||||||
|
p.Peek();
|
||||||
|
p.Read();
|
||||||
|
p.ReadBlock(null, 0, 0);
|
||||||
|
p.ReadLine();
|
||||||
|
p.ReadToEnd();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user