internal override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Free managed
                if (_workbooks != null)
                {
                    _workbooks.Dispose();
                    _workbooks = null;
                }

                if (_eventSink != null)
                {
                    _eventSink.Dispose();
                    _eventSink = null;
                }
            }

            base.Dispose(true);
        }
 internal Application(object applicationObj)
     : base(applicationObj)
 {
     _eventSink = new AppEvents_Sink(this);
 }
 /// <summary>
 /// Creates a new instance of Excel for the purposes of automation
 /// </summary>
 public Application()
     : base()
 {
     _eventSink = new AppEvents_Sink(this);
 }
 internal Application(object applicationObj)
     : base(applicationObj)
 {
     _eventSink = new AppEvents_Sink(InternalObject as IConnectionPointContainer);
 }
 /// <summary>
 /// Creates a new instance of Excel for the purposes of automation
 /// </summary>
 public Application()
     : base()
 {
     _eventSink = new AppEvents_Sink(InternalObject as IConnectionPointContainer);
 }
        internal override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Free managed
                if (_workbooks != null)
                {
                    _workbooks.Dispose();
                    _workbooks = null;
                }

                if (_eventSink != null)
                {
                    _eventSink.Dispose();
                    _eventSink = null;
                }
            }

            base.Dispose(true);
        }