Beispiel #1
0
        public override void Close()
        {
            Flush();

            base.Close();

            if (_canClose)
            {
                try {
                    CloseSite.Target(CloseSite, _io);
                } catch (MissingMethodException) {
                    // nop
                }
            }
        }
Beispiel #2
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                Flush();

                base.Dispose(disposing);

                if (_canClose)
                {
                    try {
                        CloseSite.Target(CloseSite, _io);
                    } catch (MissingMethodException) {
                        // nop
                    }
                }
            }
            else
            {
                base.Dispose(disposing);
            }
        }