System.IO.IsolatedStorage.IsolatedStorageFileStream.Flush C# (CSharp) Méthode

Flush() public méthode

public Flush ( ) : void
Résultat void
        public override void Flush() { }
        public override void Flush(bool flushToDisk) { }

Same methods

IsolatedStorageFileStream::Flush ( bool flushToDisk ) : void

Usage Example

        void wc_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e)
        {
            if (e.Error == null && !e.Cancelled)
            {
                string iconPath = "1.txt";

                using (var isf = IsolatedStorageFile.GetUserStoreForApplication())
                {
                    var isfs = new IsolatedStorageFileStream(iconPath, FileMode.Create, isf);
                    int bytesRead;
                    byte[] bytes = new byte[e.Result.Length];
                    while ((bytesRead = e.Result.Read(bytes, 0, bytes.Length)) != 0)
                    {
                        isfs.Write(bytes, 0, bytesRead);
                    }
                    isfs.Flush();
                    isfs.Close();
                }


                this.Dispatcher.BeginInvoke(() =>
                {
                    NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
                });
            }
        }
All Usage Examples Of System.IO.IsolatedStorage.IsolatedStorageFileStream::Flush