Esempio n. 1
0
 public Scheduler(IPluginFinder plugins, IHeart heart, IWorker worker, IErrorNotifier errorHandler)
 {
     _actions      = new List <ScheduledAction>(InstantiateActions(plugins));
     _heart        = heart;
     _worker       = worker;
     _errorHandler = errorHandler;
 }
Esempio n. 2
0
        public ContentChangeTracker(IIndexer indexer, IPersister persister, IWorker worker, ConnectionMonitor connection, IErrorNotifier errors, DatabaseSection config)
        {
            this.indexer = indexer;
            this.persister = persister;
            this.worker = worker;
            this.errors = errors;
            this.async = config.Search.AsyncIndexing;
            this.handleErrors = config.Search.HandleErrors;

            RetryInterval = TimeSpan.FromMinutes(2);

            if(config.Search.Enabled)
            {
                connection.Online += delegate
                {
                    persister.ItemSaved += persister_ItemSaved;
                    persister.ItemMoving += persister_ItemMoving;
                    persister.ItemMoved += persister_ItemMoved;
                    persister.ItemCopied += persister_ItemCopied;
                    persister.ItemDeleted += persister_ItemDeleted;
                };
                connection.Offline += delegate
                {
                    persister.ItemSaved -= persister_ItemSaved;
                    persister.ItemMoving -= persister_ItemMoving;
                    persister.ItemMoved -= persister_ItemMoved;
                    persister.ItemCopied -= persister_ItemCopied;
                    persister.ItemDeleted -= persister_ItemDeleted;
                };
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Registers a notifier if it's not already registered.
 /// </summary>
 /// <param name="notifier">The <see cref="IErrorNotifier"/> to register.</param>
 public void Register(IErrorNotifier notifier)
 {
     if (!Notifiers.Contains(notifier))
     {
         Notifiers.Add(notifier);
     }
 }
Esempio n. 4
0
        public override void SetUp()
        {
            base.SetUp();

            var types = new Mock <ITypeFinder>();

            types.Setup(x => x.GetAssemblies()).Returns(new[] { GetType().Assembly });

            _heart = new Mock <IHeart>();

            _errorHandler = new Mock <IErrorNotifier>().Object;

            var plugins = new PluginFinder(types.Object, _container);

            var worker = new AsyncWorker();

            worker.QueueUserWorkItem = delegate(WaitCallback function)
            {
                function(null);
                return(true);
            };

            _scheduler = new Scheduler(plugins, _heart.Object, worker, _errorHandler);
            _scheduler.Execute();
        }
        public override void SetUp()
        {
            base.SetUp();

            root = CreateOneItem <PageItem>(1, "root", null);
            one  = CreateOneItem <CustomExtensionItem>(2, "one", root);
            two  = CreateOneItem <PageItem>(3, "two", one);
            CreateOneItem <DataItem>(4, "four", root);
            three = CreateOneItem <PageItem>(5, "three.3", root);

            webContext = new FakeWebContextWrapper();
            var hostSection = new HostSection {
                Web = new WebElement {
                    Rewrite = rewriteMethod
                }
            };

            parser       = new UrlParser(persister, webContext, new Host(webContext, root.ID, root.ID), hostSection);
            errorHandler = new FakeErrorHandler();
            engine       = new FakeEngine();
            engine.Container.AddComponentInstance(null, typeof(IWebContext), webContext);
            adapterProvider = new ContentAdapterProvider(engine, new AppDomainTypeFinder());
            adapterProvider.Start();

            ReCreateDispatcherWithConfig(hostSection);
        }
Esempio n. 6
0
        public override void SetUp()
        {
            base.SetUp();

            ITypeFinder types = mocks.Stub <ITypeFinder>();

            Expect.Call(types.GetAssemblies()).Return(new Assembly[] { GetType().Assembly }).Repeat.Any();
            mocks.Replay(types);

            IHeart heart = mocks.Stub <IHeart>();

            heart.Beat += null;
            raiser      = LastCall.IgnoreArguments().GetEventRaiser();
            mocks.Replay(heart);

            errorHandler = mocks.DynamicMock <IErrorNotifier>();
            mocks.Replay(errorHandler);

            var ctx = mocks.DynamicMock <IWebContext>();

            mocks.Replay(ctx);

            IPluginFinder plugins = new PluginFinder(types, null, new EngineSection());

            AsyncWorker worker = new AsyncWorker();

            worker.QueueUserWorkItem = delegate(WaitCallback function)
            {
                function(null);
                return(true);
            };

            scheduler = new Scheduler(null, plugins, heart, worker, ctx, errorHandler);
            scheduler.Start();
        }
Esempio n. 7
0
 public Scheduler(IPluginFinder plugins, IHeart heart, IWorker worker, IErrorNotifier errorHandler)
 {
     _actions = new List<ScheduledAction>(InstantiateActions(plugins));
     _heart = heart;
     _worker = worker;
     _errorHandler = errorHandler;
 }
        public void Setup()
        {
            _errorNotifier  = null;
            _workflowResult = WorkflowResult.Finished;

            _jobInfoQueue = Substitute.For <IJobInfoQueue>();

            _profiles = new List <ConversionProfile>();
            _profiles.Add(new ConversionProfile
            {
                Guid = "SomeGuid"
            });
            _profiles.Add(new ConversionProfile
            {
                Guid     = "AnotherGuid",
                AutoSave = new AutoSave
                {
                    Enabled = true
                }
            });

            _conversionWorkflow = Substitute.For <IConversionWorkflow>();
            _conversionWorkflow.RunWorkflow(Arg.Any <Job>())
            .Returns(x =>
            {
                var job       = x.Arg <Job>();
                job.Completed = true;
                return(_workflowResult);
            });
        }
Esempio n. 9
0
        public override void SetUp()
        {
            base.SetUp();

            config  = TestSupport.SetupEngineSection();
            actions = new ScheduledAction[] { new OnceAction(), new RepeatAction() };

            heart       = mocks.Stub <IHeart>();
            heart.Beat += null;
            raiser      = LastCall.IgnoreArguments().GetEventRaiser();
            mocks.Replay(heart);

            errorHandler = mocks.DynamicMock <IErrorNotifier>();
            mocks.Replay(errorHandler);

            ctx = mocks.DynamicMock <IWebContext>();
            mocks.Replay(ctx);

            engine = new Fakes.FakeEngine();
            engine.Container.AddComponentInstance("", typeof(IErrorNotifier), MockRepository.GenerateStub <IErrorNotifier>());

            worker = new AsyncWorker();
            worker.QueueUserWorkItem = delegate(WaitCallback function)
            {
                function(null);
                return(true);
            };

            scheduler = new Scheduler(engine, heart, worker, ctx, errorHandler, actions, config);
            scheduler.Start();
        }
Esempio n. 10
0
 public ConversionWorkflowTestFactory(IProfileChecker profileChecker, ITargetFileNameComposer targetFileNameComposer, IJobRunner jobRunner, IJobDataUpdater jobDataUpdater, IErrorNotifier errorNotifier)
 {
     _profileChecker         = profileChecker;
     _targetFileNameComposer = targetFileNameComposer;
     _jobRunner      = jobRunner;
     _jobDataUpdater = jobDataUpdater;
     _errorNotifier  = errorNotifier;
 }
        public IConversionWorkflow BuildWorkflow(string targetFileName, IErrorNotifier errorNotifier)
        {
            var profileChecker         = _container.GetInstance <IProfileChecker>();
            var targetFileNameComposer = new ComTargetFileNameComposer(targetFileName);
            var jobRunner      = _container.GetInstance <IJobRunner>();
            var jobDataUpdater = _container.GetInstance <IJobDataUpdater>();

            return(new ConversionWorkflow(profileChecker, targetFileNameComposer, jobRunner, jobDataUpdater, errorNotifier));
        }
 public void SetErrorSubscription(IErrorNotifier notifier)
 {
     if (ErrorNotifier != null)
     {
         notifier.UnsubscribeToErrorEvents(OnValidationError);
     }
     ErrorNotifier = notifier;
     ErrorNotifier.SubscribeToErrorEvents(OnValidationError);
 }
Esempio n. 13
0
 public Scheduler(IEngine engine, IPluginFinder plugins, IHeart heart, IWorker worker, IWebContext context, IErrorNotifier errorHandler)
 {
     this.engine       = engine;
     actions           = new List <ScheduledAction>(InstantiateActions(plugins));
     this.heart        = heart;
     this.worker       = worker;
     this.context      = context;
     this.errorHandler = errorHandler;
 }
Esempio n. 14
0
 public Scheduler(IEngine engine, IPluginFinder plugins, IHeart heart, IWorker worker, IWebContext context, IErrorNotifier errorHandler)
 {
     this.engine = engine;
     actions = new List<ScheduledAction>(InstantiateActions(plugins));
     this.heart = heart;
     this.worker = worker;
     this.context = context;
     this.errorHandler = errorHandler;
 }
Esempio n. 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LanguageInstaller"/> class.
 /// </summary>
 /// <param name="languageService">The language service.</param>
 /// <param name="localizationService">The localization service.</param>
 /// <param name="languageFileParser">The language file parser.</param>
 /// <param name="errorNotifier">The error notifier.</param>
 public LanguageInstaller(ILanguageService languageService,
                          ILocalizationService localizationService,
                          ILanguageFileParser languageFileParser,
                          IErrorNotifier errorNotifier)
 {
     _languageService     = languageService;
     _localizationService = localizationService;
     _languageFileParser  = languageFileParser;
     _errorNotifier       = errorNotifier;
 }
Esempio n. 16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LanguageInstaller"/> class.
 /// </summary>
 /// <param name="languageService">The language service.</param>
 /// <param name="localizationService">The localization service.</param>
 /// <param name="languageFileParser">The language file parser.</param>
 /// <param name="errorNotifier">The error notifier.</param>
 public LanguageInstaller(ILanguageService languageService,
     ILocalizationService localizationService,
     ILanguageFileParser languageFileParser,
     IErrorNotifier errorNotifier)
 {
     _languageService = languageService;
     _localizationService = localizationService;
     _languageFileParser = languageFileParser;
     _errorNotifier = errorNotifier;
 }
Esempio n. 17
0
 /// <summary>Creates a new instance of the RequestLifeCycleHandler class.</summary>
 /// <param name="webContext">The web context wrapper.</param>
 /// <param name="broker"></param>
 /// <param name="dispatcher"></param>
 /// <param name="adapters"></param>
 /// <param name="errors"></param>
 /// <param name="configuration"></param>
 public RequestLifeCycleHandler(IWebContext webContext, EventBroker broker, RequestPathProvider dispatcher, IContentAdapterProvider adapters, IErrorNotifier errors,
     ConfigurationManagerWrapper configuration)
 {
     rewriteMethod = configuration.Sections.Web.Web.Rewrite;
     managementUrl = configuration.Sections.Management.ManagementInterfaceUrl;
     this.webContext = webContext;
     this.broker = broker;
     this.adapters = adapters;
     this.errors = errors;
     this.dispatcher = dispatcher;
 }
Esempio n. 18
0
 /// <summary>Creates a new instance of the RequestLifeCycleHandler class.</summary>
 /// <param name="webContext">The web context wrapper.</param>
 /// <param name="broker"></param>
 /// <param name="dispatcher"></param>
 /// <param name="adapters"></param>
 /// <param name="errors"></param>
 /// <param name="configuration"></param>
 public RequestLifeCycleHandler(IWebContext webContext, EventBroker broker, RequestPathProvider dispatcher, IContentAdapterProvider adapters, IErrorNotifier errors,
                                ConfigurationManagerWrapper configuration)
 {
     rewriteMethod   = configuration.Sections.Web.Web.Rewrite;
     managementUrl   = configuration.Sections.Management.Paths.ManagementInterfaceUrl;
     this.webContext = webContext;
     this.broker     = broker;
     this.adapters   = adapters;
     this.errors     = errors;
     this.dispatcher = dispatcher;
 }
Esempio n. 19
0
        public AsyncIndexer(IContentIndexer indexer, IPersister persister, IWorker worker, IErrorNotifier errors, DatabaseSection config)
        {
            RetryInterval     = TimeSpan.FromMinutes(2);
            this.async        = config.Search.AsyncIndexing;
            this.handleErrors = config.Search.HandleErrors;

            this.indexer   = indexer;
            this.persister = persister;
            this.worker    = worker;
            this.errors    = errors;
        }
Esempio n. 20
0
        public AsyncIndexer(IContentIndexer indexer, IPersister persister, IWorker worker, IErrorNotifier errors, DatabaseSection config)
        {
            RetryInterval = TimeSpan.FromMinutes(2);
            this.async = config.Search.AsyncIndexing;
            this.handleErrors = config.Search.HandleErrors;

            this.indexer = indexer;
            this.persister = persister;
            this.worker = worker;
            this.errors = errors;
        }
Esempio n. 21
0
        public InteractiveWorkflow(IShellManager shellManager, ITargetFileNameComposer targetFileNameComposer, IJobDataUpdater jobDataUpdater, IPathSafe pathSafe, IErrorNotifier errorNotifier, ISettingsProvider settingsProvider, IFileNameQuery saveFileQuery, ICommandLocator commandLocator)
        {
            _shellManager           = shellManager;
            _pathSafe               = pathSafe;
            _errorNotifier          = errorNotifier;
            _settingsProvider       = settingsProvider;
            _saveFileQuery          = saveFileQuery;
            _commandLocator         = commandLocator;
            _targetFileNameComposer = targetFileNameComposer;

            JobDataUpdater          = jobDataUpdater;
            _targetFileNameComposer = targetFileNameComposer;
        }
Esempio n. 22
0
        public ErrorHandler(IErrorNotifier notifier, IWebContext context, InstallationManager installer, IMailSender mailSender,
                            ConfigurationManagerWrapper configuration)
        {
            this.notifier   = notifier;
            this.context    = context;
            this.installer  = installer;
            this.mailSender = mailSender;

            beginUrl = configuration.Sections.Management.Installer.WelcomeUrl;
            action   = configuration.Sections.Engine.Errors.Action;
            mailTo   = configuration.Sections.Engine.Errors.MailTo;
            mailFrom = configuration.Sections.Engine.Errors.MailFrom;
            maxErrorReportsPerHour    = configuration.Sections.Engine.Errors.MaxErrorReportsPerHour;
            handleWrongClassException = configuration.Sections.Engine.Errors.HandleWrongClassException;
            mailSender = new SmtpMailSender();
        }
Esempio n. 23
0
        public ErrorHandler(IErrorNotifier notifier, IWebContext context, InstallationManager installer, IMailSender mailSender, 
            ConfigurationManagerWrapper configuration)
        {
            this.notifier = notifier;
            this.context = context;
            this.installer = installer;
            this.mailSender = mailSender;

            beginUrl = configuration.Sections.Management.Installer.WelcomeUrl;
            action = configuration.Sections.Engine.Errors.Action;
            mailTo = configuration.Sections.Engine.Errors.MailTo;
            mailFrom = configuration.Sections.Engine.Errors.MailFrom;
            maxErrorReportsPerHour = configuration.Sections.Engine.Errors.MaxErrorReportsPerHour;
            handleWrongClassException = configuration.Sections.Engine.Errors.HandleWrongClassException;
            mailSender = new SmtpMailSender();
        }
Esempio n. 24
0
 public RequestPathProvider(IWebContext webContext, IUrlParser parser, IErrorNotifier errorHandler, HostSection config)
 {
     this.webContext = webContext;
     this.parser = parser;
     this.errorHandler = errorHandler;
     observeAllExtensions = config.Web.ObserveAllExtensions;
     rewriteEmptyExtension = config.Web.ObserveEmptyExtension;
     StringCollection additionalExtensions = config.Web.ObservedExtensions;
     if (additionalExtensions != null && additionalExtensions.Count > 0)
     {
         observedExtensions = new string[additionalExtensions.Count + 1];
         additionalExtensions.CopyTo(observedExtensions, 1);
     }
     observedExtensions[0] = config.Web.Extension;
     nonRewritablePaths = config.Web.Urls.NonRewritable.GetPaths(webContext);
 }
Esempio n. 25
0
		public ErrorHandler(IErrorNotifier notifier, IWebContext context, InstallationManager installer, IExceptionFilter exceptionFilter, IMailSender mailSender, 
			ConfigurationManagerWrapper configuration)
		{
			this.notifier = notifier;
			this.context = context;
			this.installer = installer;
			this.exceptionFilter = exceptionFilter;
			this.mailSender = mailSender;

			beginUrl = configuration.Sections.Management.Installer.WelcomeUrl;
			action = configuration.Sections.Engine.Errors.Action;
			mailTo = configuration.Sections.Engine.Errors.MailTo;
			mailFrom = configuration.Sections.Engine.Errors.MailFrom;
			maxErrorReportsPerHour = configuration.Sections.Engine.Errors.MaxErrorReportsPerHour;
			handleWrongClassException = configuration.Sections.Engine.Errors.HandleWrongClassException;
			handleSqlException = configuration.Sections.Engine.Errors.SqlExceptionHandling == ExceptionResolutionMode.RefreshGet;
		}
Esempio n. 26
0
        public ErrorHandler(IErrorNotifier notifier, IWebContext context, InstallationManager installer, IExceptionFilter exceptionFilter, IMailSender mailSender,
                            ConfigurationManagerWrapper configuration)
        {
            this.notifier        = notifier;
            this.context         = context;
            this.installer       = installer;
            this.exceptionFilter = exceptionFilter;
            this.mailSender      = mailSender;

            beginUrl = configuration.Sections.Management.Installer.WelcomeUrl;
            action   = configuration.Sections.Engine.Errors.Action;
            mailTo   = configuration.Sections.Engine.Errors.MailTo;
            mailFrom = configuration.Sections.Engine.Errors.MailFrom;
            maxErrorReportsPerHour    = configuration.Sections.Engine.Errors.MaxErrorReportsPerHour;
            handleWrongClassException = configuration.Sections.Engine.Errors.HandleWrongClassException;
            handleSqlException        = configuration.Sections.Engine.Errors.SqlExceptionHandling == ExceptionResolutionMode.RefreshGet;
        }
Esempio n. 27
0
        public RequestPathProvider(IWebContext webContext, IUrlParser parser, IErrorNotifier errorHandler, HostSection config)
        {
            this.webContext       = webContext;
            this.parser           = parser;
            this.errorHandler     = errorHandler;
            observeAllExtensions  = config.Web.ObserveAllExtensions;
            rewriteEmptyExtension = config.Web.ObserveEmptyExtension;
            StringCollection additionalExtensions = config.Web.ObservedExtensions;

            if (additionalExtensions != null && additionalExtensions.Count > 0)
            {
                observedExtensions = new string[additionalExtensions.Count + 1];
                additionalExtensions.CopyTo(observedExtensions, 1);
            }
            observedExtensions[0] = config.Web.Extension;
            nonRewritablePaths    = config.Web.Urls.NonRewritable.GetPaths(webContext);
        }
Esempio n. 28
0
		public Scheduler(IEngine engine, IHeart heart, IWorker worker, IWebContext context, IErrorNotifier errorHandler, ScheduledAction[] registeredActions, Configuration.EngineSection config)
        {
			this.engine = engine;
			this.heart = heart;
			this.worker = worker;
			this.context = context;
			this.errorHandler = errorHandler;

			this.enabled = config.Scheduler.Enabled;
			if (!string.IsNullOrEmpty(config.Scheduler.ExecuteOnMachineNamed))
				if (config.Scheduler.ExecuteOnMachineNamed != Environment.MachineName)
					this.enabled = false;

			if (enabled)
			{
				actions = new List<ScheduledAction>(InstantiateActions(registeredActions, config.Scheduler));
			}
		}
Esempio n. 29
0
        public InteractiveWorkflow(IShellManager shellManager, ITargetFilePathComposer targetFilePathComposer, IJobDataUpdater jobDataUpdater,
                                   IErrorNotifier errorNotifier, ISettingsProvider settingsProvider,
                                   ICommandLocator commandLocator, ILastSaveDirectoryHelper lastSaveDirectoryHelper,
                                   IDirectoryHelper directoryHelper, IInteractiveProfileChecker interactiveProfileChecker,
                                   IJobEventsManager jobEventsManager
                                   )
        {
            _shellManager              = shellManager;
            _errorNotifier             = errorNotifier;
            _settingsProvider          = settingsProvider;
            _commandLocator            = commandLocator;
            _lastSaveDirectoryHelper   = lastSaveDirectoryHelper;
            _directoryHelper           = directoryHelper;
            _interactiveProfileChecker = interactiveProfileChecker;
            _targetFilePathComposer    = targetFilePathComposer;

            JobDataUpdater          = jobDataUpdater;
            JobEventsManager        = jobEventsManager;
            _targetFilePathComposer = targetFilePathComposer;
        }
		public override void SetUp()
		{
			base.SetUp();

			root = CreateOneItem<PageItem>(1, "root", null);
			one = CreateOneItem<CustomExtensionItem>(2, "one", root);
			two = CreateOneItem<PageItem>(3, "two", one);
			CreateOneItem<DataItem>(4, "four", root);
			three = CreateOneItem<PageItem>(5, "three.3", root);

			webContext = new FakeWebContextWrapper();
			var hostSection = new HostSection { Web = new WebElement { Rewrite = rewriteMethod } };
			parser = new UrlParser(persister, webContext, new Host(webContext, root.ID, root.ID), new N2.Plugin.ConnectionMonitor(), hostSection);
			errorHandler = new FakeErrorHandler();
			engine = new FakeEngine();
			engine.Container.AddComponentInstance(null, typeof(IWebContext), webContext);
			engine.Container.AddComponentInstance(null, typeof(TargetingRadar), new TargetingRadar(hostSection, new DetectorBase[0]));
			adapterProvider = new ContentAdapterProvider(engine, new AppDomainTypeFinder());
			adapterProvider.Start();

			ReCreateDispatcherWithConfig(hostSection);
		}
        private PrintJobAdapter BuildPrintJobAdapter()
        {
            var settings = new PdfCreatorSettings(null);

            settings.ConversionProfiles = _profiles;
            var settingsProvider = Substitute.For <ISettingsProvider>();

            settingsProvider.Settings.Returns(settings);

            var comWorkflowFactory = Substitute.For <IComWorkflowFactory>();

            comWorkflowFactory.BuildWorkflow(Arg.Any <string>(), Arg.Any <IErrorNotifier>())
            .Returns(x =>
            {
                _errorNotifier = x.Arg <IErrorNotifier>();
                return(_conversionWorkflow);
            });

            var jobInfo = new JobInfo
            {
                Metadata = new Metadata(Substitute.For <IAssemblyHelper>())
                {
                    Title = "Test"
                }
            };

            jobInfo.SourceFiles.Add(new SourceFileInfo());
            _job = new Job(jobInfo, _profiles[0], new JobTranslations(), new Accounts());

            _directory = Substitute.For <IDirectory>();

            var printJobAdapter = new PrintJobAdapter(settingsProvider, comWorkflowFactory, new ThreadPool(), _jobInfoQueue, new ErrorCodeInterpreter(new SectionNameTranslator()), new PathWrapSafe(), _directory);

            printJobAdapter.Job = _job;

            return(printJobAdapter);
        }
Esempio n. 32
0
        public Scheduler(IEngine engine, IHeart heart, IWorker worker, IWebContext context, IErrorNotifier errorHandler, ScheduledAction[] registeredActions, Configuration.EngineSection config)
        {
            this.engine       = engine;
            this.heart        = heart;
            this.worker       = worker;
            this.context      = context;
            this.errorHandler = errorHandler;

            this.enabled                  = config.Scheduler.Enabled;
            this.asyncActions             = config.Scheduler.AsyncActions;
            this.runWhileDebuggerAttached = config.Scheduler.RunWhileDebuggerAttached;
            if (!string.IsNullOrEmpty(config.Scheduler.ExecuteOnMachineNamed))
            {
                if (config.Scheduler.ExecuteOnMachineNamed != Environment.MachineName)
                {
                    this.enabled = false;
                }
            }

            if (enabled)
            {
                actions = new List <ScheduledAction>(InstantiateActions(registeredActions, config.Scheduler));
            }
        }
Esempio n. 33
0
 /// <summary>
 /// Ctor
 /// </summary>
 public ErrorNotifierLogger(IErrorNotifier errorNotifier, ILogger logger)
 {
     _errorNotifier = errorNotifier;
     _logger        = logger;
 }
 public FakeRequestLifeCycleHandler(IWebContext webContext, RequestPathProvider dispatcher, IContentAdapterProvider adapters, IErrorNotifier errors, ConfigurationManagerWrapper configuration)
     : base(webContext, EventBroker.Instance, dispatcher, adapters, errors, configuration)
 {
     initialized = true;
 }
Esempio n. 35
0
		public ObsoleteErrorHandler(IErrorNotifier notifier)
		{
			this.notifier = notifier;
		}
Esempio n. 36
0
 public RemoteOperationManager(IBusyIndicator busyIndicator, IErrorNotifier errorNotifier)
 {
     _busyIndicator = busyIndicator ?? throw new ArgumentNullException(nameof(busyIndicator));
     _errorNotifier = errorNotifier ?? throw new ArgumentNullException(nameof(errorNotifier));
 }
 public AnonymousErrorController(IErrorNotifier notifier, ICustomerViewMembership membership)
 {
     _notifier   = notifier;
     _membership = membership;
 }
 public ErrorController(IErrorNotifier notifier)
 {
     _notifier = notifier;
 }
 public FakeRequestLifeCycleHandler(IWebContext webContext, RequestPathProvider dispatcher, IContentAdapterProvider adapters, IErrorNotifier errors, ConfigurationManagerWrapper configuration)
     : base(webContext, EventBroker.Instance, dispatcher, adapters, errors, configuration)
 {
     initialized = true;
 }
 /// <summary>
 /// De-registers a notifier, for disabling a notifier at runtime.
 /// </summary>
 /// <param name="notifier">The notifier to remove.</param>
 /// <returns>Whether the notifier was removed. <c>false</c> indicates it was not present.</returns>
 public static bool Deregister(IErrorNotifier notifier) => Settings.Current.Notifiers.Remove(notifier);
Esempio n. 41
0
 public ObsoleteErrorHandler(IErrorNotifier notifier)
 {
     this.notifier = notifier;
 }
Esempio n. 42
0
 public LinksTracker(IPersister persister, IUrlParser urlParser, ConnectionMonitor connections, IErrorNotifier errorHandler, EditSection config)
     : base(persister, urlParser, connections, errorHandler, config)
 {
 }
Esempio n. 43
0
 /// <summary>
 /// Ctor
 /// </summary>
 public ErrorNotifierLogger(IErrorNotifier errorNotifier, ILogger logger)
 {
     _errorNotifier = errorNotifier;
     _logger = logger;
 }
 public UserRegistrationController(IMailSender mailSender, IErrorNotifier errorHandler)
 {
     this.mailSender   = mailSender;
     this.errorHandler = errorHandler;
 }