/// <summary> /// Constructor for the MainViewModel /// </summary> /// <param name="iDialogWrapper">Interface for the log-file-open-selection-dialog</param> /// <param name="iAssemblyWrapper">Interface for the get-application-version class</param> /// <param name="iParsingFactory">Interface for determining which parsing strategy we need to use</param> /// <param name="iFilterFactory">Interface for the filters we need to use in the TabViewModel</param> /// <param name="iLog">Interface for the LogParse's log file</param> public MainViewModel(IDialogWrapper iDialogWrapper, IAssemblyWrapper iAssemblyWrapper, IParsingFactory iParsingFactory, IFilterFactory iFilterFactory, ILog iLog) { _dialogWrapper = iDialogWrapper ?? throw new ArgumentNullException(nameof(iDialogWrapper)); _assemblyWrapper = iAssemblyWrapper ?? throw new ArgumentNullException(nameof(iAssemblyWrapper)); _parsingFactory = iParsingFactory ?? throw new ArgumentNullException(nameof(iParsingFactory)); _filterFactory = iFilterFactory ?? throw new ArgumentNullException(nameof(iFilterFactory)); _iLog = iLog ?? throw new ArgumentNullException(nameof(iLog)); _listLoadLine = new ObservableCollection <LogModel>(); _closedTabsList = new List <ITab>(); Tabs = new ObservableCollection <ITab>(); ClickMenuCommand = new RelayCommand(SelectLogFile); OpenClosedTabMenuCommand = new RelayCommand(ReOpenLastClosedTab); CloseTabCommand = new RelayCommand <ITab>(CloseTab); ClickOpenNotepadCommand = new RelayCommand(OpenNotepad); ExitCommand = new RelayCommand(ExitApplication); DropInFileCommand = new RelayCommand <DragEventArgs>(OpenDroppedFiles); ChangeSizeWindowCommand = new RelayCommand <EventArgs>(ChangeSizeWindow); CloseWindowCommand = new RelayCommand(CloseWindow); LastClosedTabOpenEventCommand = new RelayCommand(ReOpenLastClosedTabEvent); TabMouseClickCommand = new RelayCommand <ITab>(CloseTabMiddleButton); GetVersion(); }
protected ArrivalDeparturesControllerBase(ILocationData data, IFilterFactory filters, IMapper mapper, ILogger logger) { _timetable = data; _filters = filters; _mapper = mapper; _logger = logger; }
public TestController(IServiceHandlerFactory ServiceHandlerFactory , IFilterFactory FilterFactory , IRule RulesFactor , ICommonInfo CommonInfo) /// : base(ServiceHandlerFactory, FilterFactory, RulesFactor, CommonInfo) { }
public CrudService( AnyServiceConfig config, IRepository <TEntity> repository, CrudValidatorBase <TEntity> validator, WorkContext workContext, IModelPreparar <TEntity> modelPreparar, IEventBus eventBus, IFileStoreManager fileStoreManager, IFilterFactory filterFactory, IPermissionManager permissionManager, IEnumerable <EntityConfigRecord> entityConfigRecords, ILogger <CrudService <TEntity> > logger) { Logger = logger; Config = config; Repository = repository; Validator = validator; WorkContext = workContext; ModelPreparar = modelPreparar; EventBus = eventBus; FileStorageManager = fileStoreManager; FilterFactory = filterFactory; PermissionManager = permissionManager; CurrentEntityConfigRecord = entityConfigRecords.First(typeof(TEntity)); }
public CommandLineProcessorService(ILogger <CommandLineProcessorService> logger, IOutputService outputService, IFilterFactory filterFactory) { this.logger = logger; this.outputService = outputService; this.filterFactory = filterFactory; usage = CreateUsage(); }
public Task InvokeFiltersAsync <TContext, TFilter>(TContext context) where TContext : IFilterContext where TFilter : ICommandFilter { var filterType = typeof(TFilter); if (_cachedDelegates.TryGetValue(filterType, out var proccessDelegate)) { return(proccessDelegate(context)); } IFilterFactory selectedFilterFactory = null; foreach (var filterFactory in _filterFactories) { if (filterFactory.CanInvoke(filterType)) { selectedFilterFactory = filterFactory; break; } } if (selectedFilterFactory.HasNoContent()) { return(Task.CompletedTask); } var filterDelegate = selectedFilterFactory.GetFiltersDelegate(); CheckFilterDelegate(selectedFilterFactory, filterDelegate); var buildedDelegate = BuildDelegate(filterType, filterDelegate); return(buildedDelegate(context)); }
protected Condition(IFilterFactory filterFactory, IFilter leftPart, IFilter rightPart, string conditionValue) { _filterFactory = filterFactory; LeftPart = leftPart; RightPart = rightPart; ConditionValue = conditionValue; }
public EntitiesController( Notificator notificator, IFetchingRecords entitiesSource, IConfiguration configuration, IFilterFactory filterFactory) { if (notificator == null) { throw new ArgumentNullException("notificator"); } if (entitiesSource == null) { throw new ArgumentException("entitiesSource"); } if (configuration == null) { throw new ArgumentException("configuration"); } if (filterFactory == null) { throw new ArgumentException("filterFactory"); } _notificator = notificator; _entitiesSource = entitiesSource; _configuration = configuration; _filterFactory = filterFactory; }
public FilterItem(FilterChainKind kind, IFilterFactory factory, IFilter referenceFilter, FilterAccessor accessor, int perInvokeIndex = -1) { Kind = kind; Factory = factory; ReferenceFilter = referenceFilter; Accessor = accessor; PerInvokeIndex = perInvokeIndex; }
public SubCategoryEdits(IServiceHandlerFactory ServiceHandlerFactory , IFilterFactory FilterFactory , IListFactory ListFactory , ICommonInfo CommonInfo ) : base(ServiceHandlerFactory, FilterFactory, ListFactory, CommonInfo) { }
public ReservationsController(IDeletableRepository <Reservation> reservations, IGenericRepositoy <GeneralSettings> settings, IFilterFactory filterFactory, ICalculatePricing pricingCalculator, IReservationManager reservationManager) { this.reservations = reservations; this.setings = settings; this.filterFactory = filterFactory; this.pricingCalculator = pricingCalculator; this.reservationManager = reservationManager; }
public RecipeDetailsRepository(IEasyCachingProviderFactory cachingProviderFactory, IMediator mediator, IRecipeDetailsMapper recipeDetailsMapper, IFilterFactory <RecipeDetails, RecipeSearchFilterCriteria> filterFactory) { _mediator = mediator; _recipeDetailsMapper = recipeDetailsMapper; _filterFactory = filterFactory; _cachingProvider = cachingProviderFactory.GetCachingProvider(RedisConstants.Name); }
public Bank(IFilterFactory filterFactory) { if (filterFactory == null) { throw new ArgumentNullException(nameof(filterFactory)); } Filters = filterFactory.CreateFilter(); }
public VehicleMakeWebApiController(IVehicleMakeService service, IFilterFactory filter, IPagingParametersFactory pagingParameters, ISortingPairFactory sortingPair, ISortingParametersFactory sortingParameters) { this.Service = service; this.Filter = filter; this.PagingParameters = pagingParameters; this.SortingPair = sortingPair; this.SortingParameters = sortingParameters; }
/// <summary> /// Creates a filter parser. /// </summary> /// <param name="factory">The factory to use for constructing /// filters based on filter keys and a filter rule for matching string values.</param> /// <exception cref="ArgumentNullException">Thrown if <paramref name="factory"/> is null.</exception> public FilterParser(IFilterFactory <T> factory) { if (factory == null) { throw new ArgumentNullException("factory"); } this.factory = factory; }
private TBuilder AddRequestFilter(IFilterFactory filter) { if (filter != null) { _filters.Add(filter); } return((TBuilder)this); }
public OrderService( IUnitOfWork unitOfWork, IFilterFactory filterFactory, IPipeline <Order> pipline, IOrderPaidNotificationCenter notificationCenter) : base(unitOfWork) { _filterFactory = filterFactory; _pipeline = pipline; _notificationCenter = notificationCenter; }
public HomeController(IPipeline <IContext> pipelineManager, IFilterFactory filterFactory, IDatabaseManager databaseManager, IMicrominer microminer) { this._pipelineManager = pipelineManager; this._filterFactory = filterFactory; this._databaseManager = databaseManager; this._microminer = microminer; }
public void Init() { var request = new StubRequest(); var response = new StubResponse(); services = new StubMonoRailServices(); engStubViewEngineManager = new StubViewEngineManager(); services.ViewEngineManager = engStubViewEngineManager; filterFactoryMock = mockRepository.DynamicMock<IFilterFactory>(); services.FilterFactory = filterFactoryMock; engineContext = new StubEngineContext(request, response, services, null); }
/// <summary> /// Sets up the factory to create parameters of the appropriate type (See <see cref="IFilterFactory.CreateNewParameter"/>) while respecting any global overriding parameters /// and any explicit <paramref name="importFromIfAny"/> /// </summary> /// <param name="factory">Decides the Type of <see cref="ISqlParameter"/> created</param> /// <param name="globals">Globally overriding parameters, if a filter requires a parameter that matches a global no <see cref="ISqlParameter"/> is created</param> /// <param name="importFromIfAny">Desired parameter values, if a filter requires a parameter that matches importFromIfAny then it will get the value from here</param> public ParameterCreator(IFilterFactory factory, IEnumerable <ISqlParameter> globals, ISqlParameter[] importFromIfAny) { if (globals != null) { _globals = globals.ToArray(); } _factory = factory; _importFromIfAny = importFromIfAny; }
public void SetUp() { site = LoadFakeSite(); log = Substitute.For <ILog>(); fileSystem = Substitute.For <IFileSystem>(); filterFactory = Substitute.For <IFilterFactory>(); filter = Substitute.For <IFilter>(); filterFactory.CreateFilter(Arg.Any <string>()).Returns(filter); compiler = new Compiler(log, fileSystem, filterFactory); }
public void SetUp() { site = LoadFakeSite(); log = Substitute.For<ILog>(); fileSystem = Substitute.For<IFileSystem>(); filterFactory = Substitute.For<IFilterFactory>(); filter = Substitute.For<IFilter>(); filterFactory.CreateFilter(Arg.Any<string>()).Returns(filter); compiler = new Compiler(log, fileSystem, filterFactory); }
public ExecuteCommandCreateNewFilter(IBasicActivateItems activator, IRootFilterContainerHost host) : base(activator) { _factory = host.GetFilterFactory(); _container = host.RootFilterContainer; _host = host; if (_container == null && _host is AggregateConfiguration ac && ac.OverrideFiltersByUsingParentAggregateConfigurationInstead_ID != null) { SetImpossible("Aggregate is set to use another's filter container tree"); } }
public ElasticSearchWrapper(IElasticClient esClient, IQueryFactory queryFactory, IPagingHelper pagingHelper, ISortFactory sortFactory, ILogger <ElasticSearchWrapper> logger, IIndexSelector indexSelector, IFilterFactory filterFactory) { _esClient = esClient; _queryFactory = queryFactory; _pagingHelper = pagingHelper; _sortFactory = sortFactory; _filterFactory = filterFactory; _logger = logger; _indexSelector = indexSelector; }
public void Init() { var request = new StubRequest(); var response = new StubResponse(); services = new StubMonoRailServices(); engStubViewEngineManager = new StubViewEngineManager(); services.ViewEngineManager = engStubViewEngineManager; filterFactoryMock = mockRepository.DynamicMock <IFilterFactory>(); services.FilterFactory = filterFactoryMock; engineContext = new StubEngineContext(request, response, services, null); }
public TestWebController( IServiceHandlerFactory ServiceHandlerFactory , IRule RuleFactory , IFilterFactory FilterFactory , ICommonInfo CommonInfo ) //: base(ServiceHandlerFactory // , RuleFactory // , FilterFactory // , CommonInfo // , null) { }
public WarningService(IServiceScopeFactory scopeFactory, ILogger <ModerationModule> logger, IUserWarningsService userWarningService, IModerationModuleUtils moderationModuleUtils, IFilterFactory filterFactory) { _scopeFactory = scopeFactory; _userWarningService = userWarningService; _logger = logger; _moderationModuleUtils = moderationModuleUtils; _filterFactory = filterFactory; }
//Registers all custom filters in the assembly passed as a parameter private static void RegisterCustomFiltersInAssembly(Assembly assembly) { //Custom filters are obtained from classes in the Filters namespace that implement the IFilterFactory interface var filterFactories = from c in assembly.GetTypes() where c.IsClass && c.Namespace == CUSTOM_FILTERS_NAMESPACE && typeof(IFilterFactory).IsAssignableFrom(c) select c; //Register each filter globally using its factory method (GetFilterType) filterFactories.ToList().ForEach(filterFactoryClass => { IFilterFactory ff = (IFilterFactory)Activator.CreateInstance(filterFactoryClass); Template.RegisterFilter(ff.GetFilterType()); }); }
public OpenWithApp( IConfigProvider configProvider, IDialogService dialogService, IFilterFactory filterFactory, IProcessStarter processStarter, IIconProvider iconProvider ) { _configProvider = configProvider; _dialogService = dialogService; _filterFactory = filterFactory; _processStarter = processStarter; _iconProvider = iconProvider; }
protected ContainerMenu(IFilterFactory factory, RDMPContextMenuStripArgs args, IContainer container) : base(args, container) { _container = container; string operationTarget = container.Operation == FilterContainerOperation.AND ? "OR" : "AND"; Items.Add("Set Operation to " + operationTarget, null, (s, e) => FlipContainerOperation()); Items.Add(new ToolStripSeparator()); Add(new ExecuteCommandCreateNewFilter(args.ItemActivator, factory, _container)); Add(new ExecuteCommandCreateNewFilterFromCatalogue(args.ItemActivator, container)); Items.Add(new ToolStripSeparator()); Items.Add("Add SubContainer", _activator.CoreIconProvider.GetImage(RDMPConcept.FilterContainer, OverlayKind.Add), (s, e) => AddSubcontainer()); }
public RecordsService( IIlaroAdmin admin, IFetchingRecords entitiesSource, IFilterFactory filterFactory) { if (admin == null) throw new ArgumentNullException(nameof(admin)); if (entitiesSource == null) throw new ArgumentNullException(nameof(entitiesSource)); if (filterFactory == null) throw new ArgumentNullException(nameof(filterFactory)); _admin = admin; _entitiesSource = entitiesSource; _filterFactory = filterFactory; }
/// <summary> /// Register a built-in stream filter factory. /// </summary> /// <param name="factory">The filter factory.</param> /// <returns><c>true</c> if successfully added.</returns> public static bool AddSystemFilter(IFilterFactory factory) { PhpFilter instance; bool ok = true; foreach (string filter in factory.GetImplementedFilterNames()) { if (GetFilter(filter, false, out instance, null)) { ok = false; } } Debug.Assert(ok); systemFilters.Add(factory); return(ok); }
public ProcessEngine(IControllerFactory controllerFactory, ControllerDescriptorBuilder controllerDescriptorBuilder, IViewEngine viewEngine, IFilterFactory filterFactory, IResourceFactory resourceFactory, IScaffoldingSupport scaffoldingSupport, IViewComponentFactory viewCompFactory, IMonoRailExtension[] extensions, IEmailSender emailSender) { this.controllerFactory = controllerFactory; this.extensionComposite = new ExtensionComposite(extensions); AddService(typeof(IControllerFactory), controllerFactory); AddService(typeof(IViewEngine), viewEngine); AddService(typeof(IFilterFactory), filterFactory); AddService(typeof(IResourceFactory), resourceFactory); AddService(typeof(IScaffoldingSupport), scaffoldingSupport); AddService(typeof(IViewComponentFactory), viewCompFactory); AddService(typeof(ControllerDescriptorBuilder), controllerDescriptorBuilder); AddService(typeof(IMonoRailExtension), extensionComposite); AddService(typeof(IEmailSender), emailSender); }
public EntitiesController( Notificator notificator, IFetchingRecords entitiesSource, IConfiguration configuration, IFilterFactory filterFactory) { if (notificator == null) throw new ArgumentNullException("notificator"); if (entitiesSource == null) throw new ArgumentException("entitiesSource"); if (configuration == null) throw new ArgumentException("configuration"); if (filterFactory == null) throw new ArgumentException("filterFactory"); _notificator = notificator; _entitiesSource = entitiesSource; _configuration = configuration; _filterFactory = filterFactory; }
private void DeepClone(IContainer into, IContainer from, IFilterFactory factory) { //clone the subcontainers foreach (var container in from.GetSubContainers()) { var subContainer = factory.CreateNewContainer(); subContainer.Operation = container.Operation; into.AddChild(subContainer); DeepClone(subContainer, container, factory); } var wizard = new FilterImportWizard(BasicActivator); //clone the filters foreach (var filter in from.GetFilters()) { into.AddChild(wizard.Import(into, filter)); } }
public void SetUp() { var fileSystem = Substitute.For<IFileSystem>(); filterFactory = new FilterFactory(fileSystem); }
/// <summary> /// Sets the engine context. Also initialize all required services by querying /// <see cref="IEngineContext.Services"/> /// </summary> /// <param name="engineContext">The engine context.</param> public virtual void SetEngineContext(IEngineContext engineContext) { this.engineContext = engineContext; helperFactory = engineContext.Services.HelperFactory; // should not be null serviceInitializer = engineContext.Services.ServiceInitializer; // should not be null filterFactory = engineContext.Services.FilterFactory; // should not be null viewEngineManager = engineContext.Services.ViewEngineManager; // should not be null actionSelector = engineContext.Services.ActionSelector; // should not be null scaffoldSupport = engineContext.Services.ScaffoldingSupport; // might be null dynamicActionProviderFactory = engineContext.Services.DynamicActionProviderFactory; // should not be null }
public Compiler(ILog log, IFileSystem fileSystem, IFilterFactory filterFactory) { this.log = log; this.fileSystem = fileSystem; this.filterFactory = filterFactory; }
public static void SetFilterFactory(IFilterFactory filterFactory) { factory = filterFactory; }
public void Setup() { defaultFilterFactory = new DefaultFilterFactory(); }
/// <summary> /// Register a built-in stream filter factory. /// </summary> /// <param name="factory">The filter factory.</param> /// <returns><c>true</c> if successfully added.</returns> public static bool AddSystemFilter(IFilterFactory factory) { PhpFilter instance; bool ok = true; foreach (string filter in factory.GetImplementedFilterNames()) if (GetFilter(filter, false, out instance, null)) ok = false; Debug.Assert(ok); systemFilters.Add(factory); return ok; }
/// <summary> /// Invoked by the framework in order to give a chance to /// obtain other services /// </summary> /// <param name="provider">The service proviver</param> public void Service(IServiceProvider provider) { viewEngineManager = (IViewEngineManager) provider.GetService(typeof(IViewEngineManager)); filterFactory = (IFilterFactory) provider.GetService(typeof(IFilterFactory)); resourceFactory = (IResourceFactory) provider.GetService(typeof(IResourceFactory)); scaffoldSupport = (IScaffoldingSupport) provider.GetService(typeof(IScaffoldingSupport)); transformFilterFactory = (ITransformFilterFactory)provider.GetService(typeof(ITransformFilterFactory)); ILoggerFactory loggerFactory = (ILoggerFactory) provider.GetService(typeof(ILoggerFactory)); if (loggerFactory != null) { logger = loggerFactory.Create(typeof(ControllerLifecycleExecutor)); } }
public ShortcutsController(IShortcutDataProvider shortcutDataProvider, IRandomShortcutPicker randomShortcutPicker, IFilterFactory filterFactory) { _shortcutDataProvider = shortcutDataProvider; _randomShortcutPicker = randomShortcutPicker; _filterFactory = filterFactory; }