Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@ -58,11 +58,10 @@ namespace System.IO {
private bool m_disposed;
public BinaryReader(Stream input)
: this(input, Encoding.UTF8UnmarkedUnsafe)
: this(input, EncodingHelper.UTF8UnmarkedUnsafe)
{
}
#if NET_4_5
readonly bool leave_open;
public BinaryReader(Stream input, Encoding encoding)
@ -71,11 +70,6 @@ namespace System.IO {
}
public BinaryReader(Stream input, Encoding encoding, bool leaveOpen)
#else
const bool leave_open = false;
public BinaryReader(Stream input, Encoding encoding)
#endif
{
if (input == null || encoding == null)
throw new ArgumentNullException(Locale.GetText ("Input or Encoding is a null reference."));
@ -84,9 +78,7 @@ namespace System.IO {
m_stream = input;
m_encoding = encoding;
#if NET_4_5
leave_open = leaveOpen;
#endif
decoder = encoding.GetDecoder ();
// internal buffer size is documented to be between 16 and the value
@ -117,11 +109,7 @@ namespace System.IO {
charBuffer = null;
}
#if NET_4_0
public void Dispose ()
#else
void IDisposable.Dispose()
#endif
{
Dispose (true);
}