Esempio n. 1
0
        /// <summary>
        /// Dispose
        /// </summary>
        // http://community.sharpdevelop.net/forums/p/6210/17755.aspx#17755
        protected override void Dispose(bool disposing)
        {
            // No handle...
            if (Handle == null)
            {
                Trace.WriteLine("[BankStorage] IonicStream.Dispose() : Handle is null !");
                return;
            }


            // Rewind
            Seek(0, SeekOrigin.Begin);

            try
            {
                // Remove entry if exist
                if (Handle.ContainsEntry(FileName))
                {
                    Handle.RemoveEntry(FileName);
                }

                Handle.AddEntry(FileName, this);
            }
            catch (Exception e)
            {
                Trace.WriteLine("[BankStorage] IonicStream.Dispose() Error : " + e.Message);
            }
        }