* IsolatedStorageFileStream.cs: When creating the instance, we should check
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>
Tue, 25 May 2010 01:02:15 +0000 (01:02 -0000)
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>
Tue, 25 May 2010 01:02:15 +0000 (01:02 -0000)
for diposed first, and for closed on second place.
* IsolatedStorageFile.cs: Add Obsolete to CurrentSize and MaximumSize,
as part of 4.0.

2010-05-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>

svn path=/trunk/mcs/; revision=157816

mcs/class/corlib/System.IO.IsolatedStorage/ChangeLog
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFile.cs
mcs/class/corlib/System.IO.IsolatedStorage/IsolatedStorageFileStream.cs

index 9a6c65e87629988bfe57f002000248796f97c89c..d57a4d0699ed1e4ccc9c9a4ddf2ae752a88a171d 100644 (file)
@@ -1,3 +1,10 @@
+2010-05-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
+
+       * IsolatedStorageFileStream.cs: When creating the instance, we should check 
+       for diposed first, and for closed on second place.
+       * IsolatedStorageFile.cs: Add Obsolete to CurrentSize and MaximumSize,
+       as part of 4.0.
+
 2010-05-24  Carlos Alberto Cortez <calberto.cortez@gmail.com>
 
        * IsolatedStorageFileStream.cs: When creating our instance check that
index 0f3f2322f1e1e8f5d8be774c1d685b3d42259595..3c0bd7f6bd243b8c9b252372415bf68739c60e2e 100644 (file)
@@ -396,11 +396,17 @@ namespace System.IO.IsolatedStorage {
                }
 
                [CLSCompliant(false)]
+#if NET_4_0
+               [Obsolete]
+#endif
                public override ulong CurrentSize {
                        get { return GetDirectorySize (directory); }
                }
 
                [CLSCompliant(false)]
+#if NET_4_0
+               [Obsolete]
+#endif
                public override ulong MaximumSize {
                        // return an ulong but default is signed long
                        get {
@@ -449,6 +455,13 @@ namespace System.IO.IsolatedStorage {
                }
 
 #if NET_4_0
+               [ComVisible (false)]
+               public static bool IsEnabled {
+                       get {
+                               return true;
+                       }
+               }
+
                internal bool IsClosed {
                        get {
                                return closed;
index 6d141f899de2dbec2188f4d43546ccb0d043d79e..0bdaf3eecc3570a9029161e8f17658155c0eba59 100644 (file)
@@ -63,10 +63,10 @@ namespace System.IO.IsolatedStorage {
                        }
 
 #if NET_4_0
-                       if (isf.IsClosed)
-                               throw new InvalidOperationException ("Storage needs to be open for this operation.");
                        if (isf.IsDisposed)
                                throw new ObjectDisposedException ("IsolatedStorageFile");
+                       if (isf.IsClosed)
+                               throw new InvalidOperationException ("Storage needs to be open for this operation.");
 #endif
 
                        // ensure that the _root_ isolated storage can be (and is) created.