コード例 #1
0
        // Use the return value from this method within a 'Using' statement to release resources when done.
        private static IsolatedStorageFile GetStoreFile(IsolatedStorageType storeType)
        {
            switch (storeType)
            {
                case IsolatedStorageType.Application: return IsolatedStorageFile.GetUserStoreForApplication();
                case IsolatedStorageType.Site: return IsolatedStorageFile.GetUserStoreForSite();

                default: throw new NotSupportedException(storeType.ToString());
            }
        }
コード例 #2
0
 private static IsolatedStorageSettings GetStore(IsolatedStorageType storeType)
 {
     switch (storeType)
     {
         case IsolatedStorageType.Application: return IsolatedStorageSettings.ApplicationSettings;
         case IsolatedStorageType.Site: return IsolatedStorageSettings.SiteSettings;
         
         default: throw new NotSupportedException(storeType.ToString());
     }
 }