Beispiel #1
0
        public HResult SetSite(IServiceProvider serviceProvider)
        {
            try
            {
                if (serviceProvider == null)
                    throw new ArgumentNullException("serviceProvider");

                _serviceProvider = serviceProvider;

                _shell = (NiShell)_serviceProvider.GetService(typeof(INiShell));
                _shell.RequerySuggested += _shell_RequerySuggested;

                return HResult.OK;
            }
            catch (Exception ex)
            {
                return ErrorUtil.GetHResult(ex);
            }
        }
Beispiel #2
0
 public NiJobManager(IServiceProvider serviceProvider)
     : base(serviceProvider)
 {
     _shell = (NiShell)GetService(typeof(INiShell));
 }
Beispiel #3
0
        protected override void Dispose(bool disposing)
        {
            if (!_disposed && disposing)
            {
                if (_shell != null)
                {
                    _shell.RequerySuggested -= _shell_RequerySuggested;
                    _shell = null;
                }

                _disposed = true;
            }

            base.Dispose(disposing);
        }
Beispiel #4
0
 public MessageFilter(NiShell shell)
 {
     _shell = shell;
 }