Beispiel #1
0
        /// <inheritdoc />
        public virtual void Dispose()
        {
            ArchiveChildren?.Clear();
            DialogOptions?.Clear();
            PluginManager?.CloseAll();
            StreamManager?.ReleaseAll();

            // Dispose content of state
            switch (PluginState)
            {
            case IArchiveState archiveState:
                archiveState.Files?.ForEach(x => x.Dispose());
                break;

            case IImageState imageState:
                imageState.Images?.ForEach(x => x.Dispose());
                break;
            }

            FilePlugin    = null;
            PluginState   = null;
            FilePath      = UPath.Empty;
            FileSystem    = null;
            StreamManager = null;
            PluginManager = null;
            DialogOptions = null;

            ParentStateInfo = null;

            IsDisposed = true;
        }
Beispiel #2
0
        /// <inheritdoc />
        public virtual void Dispose()
        {
            ArchiveChildren?.Clear();
            DialogOptions?.Clear();
            PluginManager?.CloseAll();
            StreamManager?.ReleaseAll();

            FilePlugin    = null;
            PluginState   = null;
            FilePath      = UPath.Empty;
            FileSystem    = null;
            StreamManager = null;
            PluginManager = null;
            DialogOptions = null;

            ParentStateInfo = null;
        }