public SortingController( ILogger <SortingController> logger, ISortService sortService) { _logger = logger; this.sortService = sortService; }
public AlbumsService(LibraryContext context, IArtistsService artistsService, ISortService sortService, ITagsService tagsService) { _context = context; _artistsService = artistsService; _sortService = sortService; _tagsService = tagsService; }
private static void Main() { IServiceCollection serviceCollection = new ServiceCollection() .AddLogging(configure => configure.AddConsole()) .AddPlugins(AppDomain.CurrentDomain.BaseDirectory); ServiceProvider serviceProvider = serviceCollection.BuildServiceProvider(new ServiceProviderOptions { ValidateScopes = true, ValidateOnBuild = true }); var pluginDictionary = serviceProvider .GetServices <IPlugin>() .ToDictionary(k => k.GetType().GetAssemblyName(), v => v); var sortServiceDictionary = serviceProvider .GetServices <ISortService>() .ToDictionary(k => k.GetType().GetAssemblyName(), v => v); foreach ((string assemblyName, IPlugin plugin) in pluginDictionary) { ISortService sortService = sortServiceDictionary[assemblyName]; var sortedArray = sortService.Sort((int[])Data.Clone()); Console.WriteLine($"Name: {plugin.Name}"); Console.WriteLine($"Results: {string.Join(", ", sortedArray)}"); } }
public ReportController( IOrchardServices services, IProcessService processService, ISortService sortService, ISecureFileService secureFileService, ICfgService cfgService, ISlugService slugService, IAppDataFolder appDataFolder, IClock clock, IBatchCreateService batchCreateService, IBatchWriteService batchWriteService, IBatchRunService batchRunService, IBatchRedirectService batchRedirectService, IFileService fileService ) { _orchardServices = services; _processService = processService; _secureFileService = secureFileService; _sortService = sortService; _batchCreateService = batchCreateService; _batchWriteService = batchWriteService; _batchRunService = batchRunService; _batchRedirectService = batchRedirectService; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public FileLoader(IFileExplorerCommonHelper fileExplorerCommonHelper, IApplicationService applicationService, IDispatcherService dispatcherService) { this.filecommonhelper = fileExplorerCommonHelper; this.applicationService = applicationService; this.dispatcherservice = dispatcherService; GetSortService = new SortService(); }
/// <summary> /// Constructor for setting up organizer service. /// </summary> /// <param name="logger">Logger used for logging.</param> /// <param name="configuration">Configuration object containing information about settings.</param> /// <param name="context">Database context used for storing photo metadata.</param> /// <param name="sortService">Sort service used for sorting photos.</param> public OrganizerService(ILogger <IOrganizerService> logger, IConfiguration configuration, ISortService sortService, PhotoContext?context = null) { _logger = logger; _configuration = configuration; _context = context; _sortService = sortService; }
public TextController() { IRegExProvider regExProvider = new RegExProvider(); this.statisticService = new StatisticService(regExProvider); this.sortService = new SortService(regExProvider); }
public SortController( ISortService sortService, IResourceService resourceService) { this.sortService = sortService; this.resourceService = resourceService; }
public DefaultResourceService( IFieldsToSerialize fieldsToSerialize, IEnumerable <IQueryParameterService> queryParameters, IJsonApiOptions options, ILoggerFactory loggerFactory, IResourceRepository <TResource, TId> repository, IResourceContextProvider provider, IResourceChangeTracker <TResource> resourceChangeTracker, IResourceFactory resourceFactory, IResourceHookExecutor hookExecutor = null) { _fieldsToSerialize = fieldsToSerialize; _includeService = queryParameters.FirstOrDefault <IIncludeService>(); _sparseFieldsService = queryParameters.FirstOrDefault <ISparseFieldsService>(); _pageService = queryParameters.FirstOrDefault <IPageService>(); _sortService = queryParameters.FirstOrDefault <ISortService>(); _filterService = queryParameters.FirstOrDefault <IFilterService>(); _options = options; _logger = loggerFactory.CreateLogger <DefaultResourceService <TResource, TId> >(); _repository = repository; _resourceChangeTracker = resourceChangeTracker; _resourceFactory = resourceFactory; _hookExecutor = hookExecutor; _currentRequestResource = provider.GetResourceContext <TResource>(); }
public BindingListSortService(List <T> unsortedList, DataGridView grid, SortConfiguration sortConfiguration, ISortService <T> sortService) { _unsortedList = unsortedList; _grid = grid; _sortConfiguration = sortConfiguration; _sortService = sortService; }
private void InitializeComponents() { Service = FSCore.Service; StartupForm = new StartupForm(); ProgressForm = new ProgressForm(); BackgroundWorker = new BackgroundWorker(); }
private static void SortByGenderAndLastNameAscending(ISortService sortService, IList <Person> unsortedList) { IList <Person> sortedByGender = sortService.SortByGenderAndLastNameAscending(unsortedList); Console.WriteLine(" "); Console.WriteLine("Sorted by gender and by last name ascending."); PrintList(sortedByGender); }
private static void SortByBirthDateAscending(ISortService sortService, IList <Person> unsortedList) { IList <Person> sortedByBirthdate = sortService.SortByBirthDateAscending(unsortedList); Console.WriteLine(" "); Console.WriteLine("Sorted by date of birth ascending."); PrintList(sortedByBirthdate); }
public SearchesController(ISearchService searchService, IDocumentsService docService, ISortService sortService, IEuCaselawFilterService euCaselawFilterService) { this.searchService = searchService; this.docService = docService; this.sortService = sortService; this.euCaselawFilterService = euCaselawFilterService; }
public void Initialize() { //arrange var messageHandler = Substitute.For <MockHttpMessageHandler>(jsonResponse, HttpStatusCode.OK); var httpClient = new HttpClient(messageHandler); _sortService = Substitute.For <ISortService>(); }
private static void SortByLastNameDescending(ISortService sortService, IList <Person> unsortedList) { IList <Person> sortedBylastName = sortService.SortByLastNameDescending(unsortedList); Console.WriteLine(" "); Console.WriteLine("Sorted by last name descending."); PrintList(sortedBylastName); }
public PlaylistService(IPlaylistRepository playlistRepository, ISongService songService, ISortService sortService) { this.playlistRepository = playlistRepository; this.songService = songService; this.sortService = sortService; Playlists = new ObservableCollection<Playlist>(); Songs = new ObservableCollection<Song>(); }
public IActionResult Index() { ISortService SortService = this.CreateService <ISortService>(); List <Sort> ListSort = SortService.GetList((int)EnumSort.Link, ""); ViewBag.ListSort = ListSort; return(View()); }
private static void Parse(IParser _parserService, ISortService sortService) { Console.WriteLine("Enter file and path with file format specified as part of the name, " + "such as 'comma', 'pipe' or 'space':"); string input = Console.ReadLine(); IList <Person> unsortedList = _parserService.GetPersons(input); Sort(sortService, unsortedList); }
private static void InitializeServices() { List <FileFormatGetter> formatGetters = GetFormatGetters(); Dictionary <FormatEnum, char> delimiters = GetDelimiters(); IStreamReader streamReader = new StreamReaderWrapper(); IFileSystem fileSystemWrapper = new FileSystemWrapper(); _parserService = new ParserService(streamReader, fileSystemWrapper, formatGetters, delimiters); _sortService = new SortService(); }
public void SetUp() { this.beforeSorting = new List <IProduct> { product1, product2, product3 }; this.sortingService = new SortService(); }
public ProductController( IMapper mapper, ICategoryService categoryService, IProductService productService, ISortService sortService) { _mapper = mapper; _categoryService = categoryService; _productService = productService; _sortService = sortService; }
/// <summary>Creates a new instance of the controller.</summary> /// <param name="readerService">The service for reading the CSV file.</param> /// <param name="writerService">The service for writting the CSV file.</param> /// <param name="configuration">The configuration for the application.</param> /// <param name="sortService">The service for sorting the players.</param> /// <param name="cleanService">The service for cleaning up the data to reduce chances of errors.</param> public PlayerController(ICsvFileReaderService readerService, ICsvFileWriterService writerService, IConfiguration configuration, ISortService sortService, IDataCleanerService cleanService) { _readerService = readerService; _writerService = writerService; _configuration = configuration; _sortService = sortService; _cleanService = cleanService; }
public ReportController( IOrchardServices services, IProcessService processService, ISortService sortService, ISecureFileService secureFileService ) { _orchardServices = services; _processService = processService; _secureFileService = secureFileService; _sortService = sortService; }
static void Main(string[] args) { _serviceProvider = RegisterServices(); ISortService _sortService = _serviceProvider.GetService <ISortService>(); var result = _sortService.Sort("Contrary to popular belief, the pink unicorn flies east."); Console.WriteLine($"Result is: { result }"); Console.Read(); DisposeServices(); }
public SortCriterionController( IOrchardServices services, IFormManager formManager, IShapeFactory shapeFactory, IProjectionManager projectionManager, IRepository<SortCriterionRecord> repository, IQueryService queryService, ISortService sortService) { Services = services; _formManager = formManager; _projectionManager = projectionManager; _repository = repository; _queryService = queryService; _sortService = sortService; Shape = shapeFactory; }
public ExportController( IOrchardServices services, IProcessService processService, ISortService sortService, ISlugService slugService, IAppDataFolder appDataFolder ) { _appDataFolder = appDataFolder; _orchardServices = services; _processService = processService; _sortService = sortService; _slugService = slugService; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public SortServiceTests() { _fixture = FixtureBuilder.Build(); _productSort1 = _fixture.Create <IProductSortService>(); _productSort2 = _fixture.Create <IProductSortService>(); _fixture.Inject <IReadOnlyList <IProductSortService> >(new List <IProductSortService> { _productSort1, _productSort2 }); _productsRepository = _fixture.Freeze <IProductsRepository>(); _sut = _fixture.Create <SortService>(); }
public ApiController( IOrchardServices orchardServices, IIpRangeService ipRangeService, IProcessService processService, ISortService sortService, ISecureFileService secureFileService ) { _orchardServices = orchardServices; _ipRangeService = ipRangeService; _processService = processService; _sortService = sortService; _secureFileService = secureFileService; T = NullLocalizer.Instance; Logger = NullLogger.Instance; }
public SortCriterionController( IOrchardServices services, IFormManager formManager, IShapeFactory shapeFactory, IProjectionManager projectionManager, IRepository <SortCriterionRecord> repository, IQueryService queryService, ISortService sortService) { Services = services; _formManager = formManager; _projectionManager = projectionManager; _repository = repository; _queryService = queryService; _sortService = sortService; Shape = shapeFactory; }
public ArrangementLoadService( ICustomFileStore formFileStore, IParameterService parameterService, ISortService sortService, ISettingsService settings, IConfigurationContainer configurationContainer, IFileService fileService, CombinedLogger <ArrangementLoadService> logger ) { _formFileStore = formFileStore; _parameters = parameterService.GetParameters(); _sortService = sortService; _settings = settings; _logger = logger; _fileService = fileService; _configurationContainer = configurationContainer; }
public PivotTableController( IOrchardServices services, IProcessService processService, ISortService sortService, ISecureFileService secureFileService, ICfgService cfgService, ISlugService slugService, IAppDataFolder appDataFolder, IClock clock, IBatchCreateService batchCreateService, IBatchWriteService batchWriteService, IBatchRunService batchRunService, IBatchRedirectService batchRedirectService, IFileService fileService ) { _orchardServices = services; _processService = processService; _secureFileService = secureFileService; }