System.IO.IsolatedStorage.IsolatedStorageFile.GetEnumerator C# (CSharp) Method

GetEnumerator() public static method

public static GetEnumerator ( IsolatedStorageScope scope ) : IEnumerator
scope IsolatedStorageScope
return IEnumerator
        public static IEnumerator GetEnumerator(IsolatedStorageScope scope)
        {
            // Not currently supported: https://github.com/dotnet/corefx/issues/10936

            // Implementing this would require serializing/deserializing identity objects which is particularly
            // complicated given the normal identity objects used by NetFX aren't available on CoreFX.
            //
            // Starting expectation is that a given store's location would be identical between implementations
            // (say, for a particular StrongName). You could iterate any store opened at least once by NetFX on
            // NetFX as it would create the needed identity file. You wouldn't be able to iterate if it was only
            // ever opened by CoreFX, as the needed file isn't there yet.
            return new IsolatedStorageFileEnumerator();
        }

Same methods

IsolatedStorageFile::GetEnumerator ( System scope ) : System.Collections.IEnumerator

Usage Example

Esempio n. 1
0
        public void GetEnumerator_ThrowsForCurrent()
        {
            IEnumerator e = IsolatedStorageFile.GetEnumerator(IsolatedStorageScope.Assembly);

            Assert.Throws <InvalidOperationException>(() => e.Current);
            e.MoveNext();
            Assert.Throws <InvalidOperationException>(() => e.Current);
        }
All Usage Examples Of System.IO.IsolatedStorage.IsolatedStorageFile::GetEnumerator