Example #1
0
        protected virtual void PersistSortSequence()
        {
            if (Clerk == null || Clerk.IsDisposed)
            {
                return;                 // temporary clerk, such as a concordance in find example dialog.
            }
            // If we're being disposed because the application is crashing, we do NOT want to save the sort
            // sequence. It might contain bad objects, or represent a filtered state that is NOT going to
            // be persisted because of the crash. LT-11446.
            if (FwApp.InCrashedState)
            {
                return;
            }
            var pathname = GetClerkPersistPathname();
            var watch    = new Stopwatch();

            watch.Start();
            Clerk.PersistListOn(pathname);
            watch.Stop();
            Debug.WriteLine("Saving clerk " + pathname + " took " + watch.ElapsedMilliseconds + " ms.");
        }