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); } }
public NiJobManager(IServiceProvider serviceProvider) : base(serviceProvider) { _shell = (NiShell)GetService(typeof(INiShell)); }
protected override void Dispose(bool disposing) { if (!_disposed && disposing) { if (_shell != null) { _shell.RequerySuggested -= _shell_RequerySuggested; _shell = null; } _disposed = true; } base.Dispose(disposing); }
public MessageFilter(NiShell shell) { _shell = shell; }