Larry Ewing
137a5c40cf
Rework exception handling in MemoryStream async methods
...
Return faulted tasks for runtime errors when using the MemoryStream
Async methods.
2012-09-14 13:27:54 -05:00
Marek Safar
5c3df6b95f
Mark some Stream members non-serialized. Fixes #5454
2012-06-07 14:25:48 +01:00
Marek Safar
26a9ba9b74
Add new 4.5 stream overloads
2012-03-19 17:15:49 +00:00
Jérémie Laval
df1e2d9a08
Move things around in Task and Task_T
2011-09-25 18:53:56 +02:00
Marek Safar
7f4dbcc68b
Add a few new async stream methods
2011-09-22 18:39:40 +01:00
Marek Safar
11db01b5a1
Add few new 4.5 overloads
2011-09-19 19:34:27 +01:00
Marek Safar
1feb50a5cf
Make MemoryStream more .net compatible
2011-09-02 16:36:52 +01:00
Gonzalo Paniagua Javier
1e7c592026
Avoid null refs when capacity set to 0
...
This fixes bug #676060 .
2011-03-08 18:05:46 -05:00
Carlos Alberto Cortez
8b0f2bebd5
2010-02-22 Carlos Alberto Cortez <[email protected] >
...
* MemoryStream.cs: When setting Capacity, don't create a new buffer if
the new expected value is the same as the current one.
svn path=/trunk/mcs/; revision=152217
2010-02-22 22:23:49 +00:00
Gonzalo Paniagua Javier
ee93ee61fe
fix signature
...
svn path=/trunk/mcs/; revision=151575
2010-02-12 01:32:56 +00:00
Carlos Alberto Cortez
992a4b5afc
2010-01-03 Carlos Alberto Cortez <[email protected] >
...
* MemoryStream.cs: Don't clear the bytes beyond Length when shrinking
it. Instead just save the related information for it and do it when
Length grows and touchs that dirty region. Refactor the code where
needed to avoid duplication as well.
Fixes #327053 .
svn path=/trunk/mcs/; revision=148995
2010-01-04 03:46:31 +00:00
Miguel de Icaza
fe09fc6f64
More 4.0 work
...
svn path=/trunk/mcs/; revision=145674
2009-11-08 18:32:52 +00:00
Miguel de Icaza
0204abe803
Drop more obsolete defines
...
svn path=/trunk/mcs/; revision=144304
2009-10-17 01:35:27 +00:00
Andreas N
b7ebfaf624
2008-07-03 Andreas Nahr <[email protected] >
...
* TextWriter.cs:
* StreamWriter.cs:
* StreamReader.cs:
* Stream.cs:
* MemoryStream.cs:
* File.cs:
* DriveNotFoundException.cs:
* Directory.cs: Fix parameter names
svn path=/trunk/mcs/; revision=107182
2008-07-03 20:00:51 +00:00
Sebastien Pouliot
981545c2e4
2008-02-03 Sebastien Pouliot <[email protected] >
...
* MemoryStream.cs: Remove unused code found by Gendarme.
svn path=/trunk/mcs/; revision=94700
2008-02-03 17:17:54 +00:00
Zoltan Varga
35a99a9511
2007-12-28 Zoltan Varga <[email protected] >
...
* MemoryStream.cs: Fix crash if internalBuffer is null. Avoid calling
unsafe icalls. Fixes #350860 .
svn path=/trunk/mcs/; revision=91971
2007-12-28 00:39:33 +00:00
Atsushi Eno
79faeec3d3
2007-09-06 Atsushi Enomoto <[email protected] >
...
* Stream.cs, BufferedStream.cs, MemoryStream.cs: in 2.0 override
Dispose(bool) rather than Close().
Stream.Dispose() is virtual in 2.0.
svn path=/trunk/mcs/; revision=85389
2007-09-06 05:18:18 +00:00
Dick Porter
5b79519900
2007-04-30 Dick Porter <[email protected] >
...
* Directory.cs:
* FileShare.cs:
* DirectoryNotFoundException.cs:
* SeekOrigin.cs:
* FileAttributes.cs:
* IOException.cs:
* MemoryStream.cs:
* FileMode.cs:
* BinaryWriter.cs:
* TextWriter.cs:
* File.cs:
* BinaryReader.cs:
* TextReader.cs:
* UnmanagedMemoryStream.cs:
* StringWriter.cs:
* FileAccess.cs:
* FileLoadException.cs:
* BufferedStream.cs:
* Stream.cs:
* FileInfo.cs:
* FileStream.cs:
* StringReader.cs:
* StreamWriter.cs:
* EndOfStreamException.cs:
* DriveInfo.cs:
* StreamReader.cs:
* PathTooLongException.cs:
* DriveType.cs:
* FileNotFoundException.cs: 2.0 profile updates
svn path=/trunk/mcs/; revision=76495
2007-04-30 14:05:12 +00:00
Miguel de Icaza
8a1af5fd38
2006-11-16 Miguel de Icaza <[email protected] >
...
* DirectoryInfo.cs (GetFiles): Implement option with SearchOptions
== AllDirectories
And a lot of MonoTODOs updated as well
svn path=/trunk/mcs/; revision=67998
2006-11-16 14:14:01 +00:00
Ben Maurer
eab4ef7aa1
2004-09-06 Ben Maurer <[email protected] >
...
* MemoryStream.cs (SetLength): Use Array.Clear here
svn path=/trunk/mcs/; revision=33401
2004-09-06 14:03:41 +00:00
Gert Driesen
0d5fadd9d0
* MemoryStream.cs: added TODO for serialization
...
* StringWriter.cs: added TODO for serialization
* TextWriter.cs: fixed CoreNewLine to return char[]
svn path=/trunk/mcs/; revision=29619
2004-06-15 17:51:32 +00:00
Duncan Mak
13d1764537
Add license and copyright to all source files in corlib
...
svn path=/trunk/mcs/; revision=29249
2004-06-11 02:09:36 +00:00
Sebastien Pouliot
9cd88d39f6
2004-05-26 Sebastien Pouliot <[email protected] >
...
* BufferedStream.cs: Fixed possible integer overflow.
* FileStream.cs: Fixed possible integer overflow.
* MemoryStream.cs: Fixed possible integer overflow.
* StringReader.cs: Fixed possible integer overflow.
svn path=/trunk/mcs/; revision=28176
2004-05-26 17:40:51 +00:00
Sebastien Pouliot
4494459053
2004-05-24 Sebastien Pouliot <[email protected] >
...
* MemoryStream.cs: Fixed exception reporting to match MS Fx. Fixed the
condition to allow zeroization of existing data when we shrink the
stream.
svn path=/trunk/mcs/; revision=27977
2004-05-24 15:39:39 +00:00
Ben Maurer
3881e09320
2003-11-14 Ben Maurer <[email protected] >
...
* MemoryStream.cs (.ctor): We need to check if buffer is null
before we get the Length of it.
svn path=/trunk/mcs/; revision=20016
2003-11-15 03:48:24 +00:00
Lluis Sanchez
965b3402a0
* BufferedStream.cs, FileStream.cs, MemoryStream.cs, Stream.cs:
...
Added [In,Out] attributes to Read method.
svn path=/trunk/mcs/; revision=18042
2003-09-11 23:44:33 +00:00
Gonzalo Paniagua Javier
f44145d60e
2003-07-10 Gonzalo Paniagua Javier <[email protected] >
...
* MemoryStream.cs: fixed bug #46060 . Thanks to Carlos Barcenilla.
svn path=/trunk/mcs/; revision=16079
2003-07-10 01:59:45 +00:00
Ville Palo
f40f59cdc5
2003-04-19 Ville Palo <[email protected] >
...
* BufferedStream.cs: Some fixes, mostly throwing exceptions.
* MemoryStream.cs: Changed the order of exception checking
* StringReader.cs: little clean up
svn path=/trunk/mcs/; revision=13798
2003-04-19 02:17:25 +00:00
Gonzalo Paniagua Javier
8428d51a90
2003-03-05 Gonzalo Paniagua Javier <[email protected] >
...
* MemoryStream.cs: general fixes and reformatted. Passes all tests in
the new MemoryStreamTest.
svn path=/trunk/mcs/; revision=12213
2003-03-05 11:12:52 +00:00
Gonzalo Paniagua Javier
b89975d19e
2003-03-05 Gonzalo Paniagua Javier <[email protected] >
...
* MemoryStream.cs: undo my bogus fix in ToArray. Allow GetBuffer and
ToArray even after closing the stream.
svn path=/trunk/mcs/; revision=12204
2003-03-05 02:24:44 +00:00
Gonzalo Paniagua Javier
6d7b6e68dd
2003-02-26 Gonzalo Paniagua Javier <[email protected] >
...
* MemoryStream.cs:
(ToArray): return only the portion of the buffer that contains
data, not the whole buffer. (note: this makes XmlDocument.Load work
again with documents that have a <?xml without the 'encoding'
attribute, which makes gtk-sharp generator work again).
svn path=/trunk/mcs/; revision=11979
2003-02-26 03:40:35 +00:00
Paolo Molaro
2c5bcddb86
Tue Feb 25 11:55:35 CET 2003 Paolo Molaro <[email protected] >
...
* MemoryStream.cs: make it behave sanely when the stream is
incrementally expanded.
svn path=/trunk/mcs/; revision=11953
2003-02-25 11:00:02 +00:00
Gonzalo Paniagua Javier
9119c83a15
2003-02-03 Gonzalo Paniagua Javier <[email protected] >
...
* System/AppDomain.cs: implemented AppendPrivatePath, ClearPrivatePath
and ClearShadowCopyPath and fixed GetType ().
* System/Attribute.cs: clean up.
* System/Console.cs: removed UnixConsoleEncoding. Use Default.
* System.IO/MemoryStream.cs: create the buffer of the specified capacity.
* System.Text/Encoding.cs: removed UnixConsoleEncoding.
svn path=/trunk/mcs/; revision=11147
2003-02-03 02:38:48 +00:00
Patrik Torstensson
13a1207724
2003-01-31 Patrik Torstensson
...
* MemoryStream.cs: use BlockCopyInternal instead of Array.Copy, this is
the same way as MS does it (performance improvement)
svn path=/trunk/mcs/; revision=11077
2003-01-31 10:37:40 +00:00
Miguel de Icaza
4da2ade4ab
according to the ECMA:
...
"The buffer of a closed System.IO.MemoryStream is still available, and the
System.IO.MemoryStream.ToArray and System.IO.MemoryStream.GetBuffer methods
can be called successfully."
svn path=/trunk/mcs/; revision=10601
2003-01-17 05:45:22 +00:00
Gonzalo Paniagua Javier
1900d8f0a5
2003-01-06 Gonzalo Paniagua Javier <[email protected] >
...
* MemoryStream.cs: fixed bug #36319 .
svn path=/trunk/mcs/; revision=10219
2003-01-06 17:57:49 +00:00
Miguel de Icaza
5ae30b2894
Remove old comment
...
svn path=/trunk/mcs/; revision=8772
2002-11-02 21:11:31 +00:00
Nick Drochak
b358c5c6ba
2002-09-16 Nick Drochak <[email protected] >
...
* MemoryStream.cs (Close): Don't throw an exception if the stream
is already closed.
svn path=/trunk/mcs/; revision=7491
2002-09-16 04:38:41 +00:00
Gonzalo Paniagua Javier
5bf2383288
2002-08-27 Gonzalo Paniagua Javier <[email protected] >
...
* System.IO/BinaryReader.cs:
* System.IO/BinaryWriter.cs:
* System.IO/MemoryStream.cs:
* System.IO/StreamReader.cs:
* System.IO/StreamWriter.cs:
* System.IO/StringReader.cs:
* System.IO/StringWriter.cs:
* System.IO/TextWriter.cs:
* System.Threading/WaitHandle.cs: IDisposable fixes.
svn path=/trunk/mcs/; revision=7118
2002-08-28 02:30:47 +00:00
Piers Haken
9e63489461
Miscellaneous minor compliancy fixes:
...
* System/System/UriBuilder.cs: use visible EscapeString
* corlib/System.Reflection/ManifestResourceInfo.cs: constructor access, define fields
* corlib/System/Convert.cs: remove erroneous CLSCompliant attributes
* corlib/System/Math.cs: remove erroneous CLSCompliant attribute
Fix enum values:
* System/System.CodeDom/CodeBinaryOperatorType.cs
* System/System.Net.Sockets/ProtocolFamily.cs
* corlib/System.Globalization/CultureTypes.cs
* corlib/System.Reflection/FieldAttributes.cs
* corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
* corlib/System.Security.Cryptography/CipherMode.cs
* corlib/System.Security.Cryptography/CspProviderFlags.cs
* corlib/System.Security.Cryptography/PaddingMode.cs
* corlib/System.Security.Permissions/IsolatedStorageContainment.cs
* corlib/System.Security.Permissions/ReflectionPermissionFlag.cs
* corlib/System.Security.Permissions/SecurityPermissionFlag.cs
* corlib/System.Security/PolicyLevelType.cs
* corlib/System.Security/SecurityZone.cs
* corlib/System/AttributeTargets.cs
* corlib/System/Environment.cs
Remove redundant overrides:
* corlib/System.Reflection.Emit/EnumBuilder.cs
* corlib/System.Reflection.Emit/TypeBuilder.cs
* corlib/System/MissingFieldException.cs
* corlib/System/MissingMemberException.cs
* corlib/System/MissingMethodException.cs
Fix visibility and access modifiers:
* System/System.CodeDom.Compiler/CodeGenerator.cs
* System/System.Collections.Specialized/NameObjectCollectionBase.cs
* System/System.Collections.Specialized/NameValueCollection.cs
* System/System.ComponentModel/EventDescriptor.cs
* System/System.ComponentModel/EventDescriptorCollection.cs
* System/System.Diagnostics/ProcessStartInfo.cs
* System/System.Net/DnsPermission.cs
* System/System.Net/SocketPermission.cs
* System/System/Uri.cs
* corlib/System.IO/StreamReader.cs
* corlib/System.IO/StringReader.cs
* corlib/System.IO/StringWriter.cs
* corlib/System.IO/TextWriter.cs
* corlib/System.Reflection.Emit/ConstructorBuilder.cs
* corlib/System.Reflection.Emit/MethodBuilder.cs
* corlib/System.Reflection.Emit/OpCodes.cs
* corlib/System.Reflection/Assembly.cs
* corlib/System.Runtime.Remoting.Messaging/ReturnMessage.cs
* corlib/System.Runtime.Serialization/SerializationException.cs
* corlib/System/Activator.cs
* corlib/System/Array.cs
* corlib/System/Boolean.cs
* corlib/System/Byte.cs
* corlib/System/Char.cs
* corlib/System/DateTime.cs
* corlib/System/DivideByZeroException.cs
* corlib/System/Double.cs
* corlib/System/Int16.cs
* corlib/System/Int32.cs
* corlib/System/Int64.cs
* corlib/System/SByte.cs
* corlib/System/Single.cs
* corlib/System/Type.cs
* corlib/System/UInt16.cs
* corlib/System/UInt32.cs
* corlib/System/UInt64.cs
Fix IDisposable, Dispose() mess
* corlib/System.IO/BinaryWriter.cs
* corlib/System.IO/BufferedStream.cs
* corlib/System.IO/FileStream.cs
* corlib/System.IO/MemoryStream.cs
* corlib/System.IO/Stream.cs
svn path=/trunk/mcs/; revision=4416
2002-05-08 13:21:13 +00:00
Nick Drochak
5a19c6539a
2002-05-03 Nick Drochak <[email protected] >
...
* MemoryStream.cs: Refrain from allocating array until the space is
really needed. This fixes a bug in the Length property when the
constructor without the byte array is used.
svn path=/trunk/mcs/; revision=4223
2002-05-02 12:32:37 +00:00
Piers Haken
610d7923ac
added missing [Serializable] attribute
...
svn path=/trunk/mcs/; revision=3540
2002-04-01 20:22:40 +00:00
Mike Kestner
cf66be23aa
2002-03-25 Mike Kestner <[email protected] >
...
* MemoryStream.cs (Read): Fixed bug in exception throw.
svn path=/trunk/mcs/; revision=3327
2002-03-25 12:28:57 +00:00
Miguel de Icaza
44f9f53049
MemoryStream implementation from Marcin
...
svn path=/trunk/mcs/; revision=244
2001-07-19 20:04:24 +00:00