private static void Main() { ServiceProvider sp = Container.Build(); IFilesService filesService = sp.GetService <IFilesService>(); IUserAccessService userAccessService = sp.GetService <IUserAccessService>(); IUserConsoleInputViewModelToNewFileDtoAdapter adapterViewModelToNewFileDto = sp.GetService <IUserConsoleInputViewModelToNewFileDtoAdapter>(); try { Console.WriteLine(" ######## Welcome to File Reader ######## "); Console.WriteLine(" ######################################## "); Console.WriteLine(Environment.NewLine); UserConsoleInputViewModel viewModel = new UserConsoleInputViewModel(); ReadInputOption <UserOperationType>(viewModel.Operation, "operation", UserAccess.AvailableUserOperations()); ReadInputOption <UserAccessOperationType>(viewModel.AccessOperation, "access operation", UserAccess.AvailableUserAccessOperations()); ReadUserInputs(viewModel); NewFileDto dto = adapterViewModelToNewFileDto.Adapt(viewModel); string fileContent = filesService.ReadNewFile(dto); Console.WriteLine(fileContent); Console.ReadKey(); } finally { sp.Dispose(); } }
public ChocolateyPackageInformationService(IFileSystem fileSystem, IRegistryService registryService, IFilesService filesService) { _fileSystem = fileSystem; _registryService = registryService; _filesService = filesService; _config = Config.get_configuration_settings(); }
public OrdersService(IDeletableEntityRepository <OrderDocument> dbOrderDocument, IDeletableEntityRepository <Order> dbOrder, IFilesService filesService, IHtmlSanitizer sanitizer) { this.dbOrderDocument = dbOrderDocument; this.dbOrder = dbOrder; this.filesService = filesService; this.sanitizer = sanitizer; }
public ChocolateyPackageInformationService(IFileSystem fileSystem, IRegistryService registryService, IFilesService filesService, ChocolateyConfiguration config) { _fileSystem = fileSystem; _registryService = registryService; _filesService = filesService; _config = config; }
public MoviesService( IFilesService filesService, IMoviesRepository moviesRepository) { _filesService = filesService; _moviesRepository = moviesRepository; }
public DiProxy( IPlacesService placesService , SessionOperator sessionOperator , IObjectTypesService objectTypesService , IObjectsService objectsService , ILocalizationService localeService , IMapper mapper , ILocalizer localizer , IAdsService adsService , IFilesService filesService , ConfigValuesCollection configValues , IUserInfoService userInfoService) { _elements.Add(typeof(IPlacesService), placesService); _elements.Add(typeof(SessionOperator), sessionOperator); _elements.Add(typeof(IObjectTypesService), objectTypesService); _elements.Add(typeof(IObjectsService), objectsService); _elements.Add(typeof(ILocalizationService), localeService); _elements.Add(typeof(IMapper), mapper); _elements.Add(typeof(ILocalizer), localizer); _elements.Add(typeof(IAdsService), adsService); _elements.Add(typeof(IFilesService), filesService); _elements.Add(typeof(ConfigValuesCollection), configValues); _elements.Add(typeof(IUserInfoService), userInfoService); }
public ProjectsGalleryService(IRepository <GalleryProject> dbImageToProject, IRepository <FileOnFileSystem> dbFileOnFilesystem, IFilesService filesService, IProjectsService projectsService) { this.dbImageToProject = dbImageToProject; this.dbFileOnFilesystem = dbFileOnFilesystem; this.filesService = filesService; this.projectsService = projectsService; }
public FilesServiceTests() { TestsData testsData = TestsData.Create(nameof(FilesServiceTests)); filesService = testsData.AppServiceProvider.FilesService; fillTestDbHelper = testsData.FillTestDbHelper; }
/// <summary> /// Initializes a new instance of the <see cref="NugetService" /> class. /// </summary> /// <param name="fileSystem">The file system.</param> /// <param name="nugetLogger">The nuget logger</param> /// <param name="packageInfoService">Package information service</param> /// <param name="filesService">The files service</param> public NugetService(IFileSystem fileSystem, ILogger nugetLogger, IChocolateyPackageInformationService packageInfoService, IFilesService filesService) { _fileSystem = fileSystem; _nugetLogger = nugetLogger; _packageInfoService = packageInfoService; _filesService = filesService; }
public DeleteFilesRequestHandler(Request request, ClientConnection clientConnection, INodeNoticeService nodeNoticeService, IFilesService filesService) { this.request = (DeleteFilesRequest)request; this.clientConnection = clientConnection; this.nodeNoticeService = nodeNoticeService; this.filesService = filesService; }
public HomeController( ILogger <HomeController> logger, IFilesService filesService) { _logger = logger; _filesService = filesService; }
public CategoriesService(NorthwindContext context, IFilesService filesService, IOptions <ApplicationSettings> settingsOptions) { _context = context; _filesService = filesService; _applicationSettings = settingsOptions.Value; _nameOfDirectory = _applicationSettings.NameOfDirectory; }
public FileApiController(IFilesService service, IAuthenticationService <int> authService, ILogger <FileApiController> logger) : base(logger) { _service = service; _authService = authService; }
public UsersService(IUnitOfWork unit, IMapper mapper, IPasswordHasher <User> hasher, Anonymiser <User> anonymiser, IFilesService files) : base(unit, mapper) { Hasher = hasher; Anonymiser = anonymiser; Files = files; }
public async Task InvokeAsync(HttpContext context, IFilesService filesService) { if (context.Request.Path.Value.Contains("Categories/GetImage") || context.Request.Path.Value.Contains("Categories/image") || context.Request.Path.Value.Contains("Categories/GetFile")) { var currentTime = DateTime.Now; if ((currentTime - _previousTime).Minutes > _maximumPeriodBetweenRequest) { if (Directory.Exists(FolderName)) { Directory.Delete(FolderName, true); } _previousTime = currentTime; await _next(context); } var id = int.Parse(context.Request.Path.Value.Split('/').Last()); var ms = filesService.Read(id); if (ms != null) { await context.Response.Body.WriteAsync(ms.GetBuffer(), 0, ms.GetBuffer().Length); } await _next(context); } else { await _next(context); } }
public FilesController(IFilesService filesService, ILogService logService, IMapper mapper, IWebHostEnvironment env) { _filesService = filesService; _logger = logService; _mapper = mapper; _env = env; }
public UsersController(IUsersService usersService, IUserRoleRequestsRepository userRoleAcceptationsRepository, IFilesService filesService, UserManager <ApplicationUser> userManager) { _usersService = usersService; _fileService = filesService; }
public CommentController(ICommentsService comments, IWebHostEnvironment host, ILogger <CommentController> logger, IFilesService files) { _commentsService = comments; _host = host; _logger = logger; _filesService = files; }
public FilesController(IFilesService fileService, ISlideUpdateManagerService slideUpdateManagerService, IHostingEnvironment hostingEnvironment, ITagManagerService tagManagerService) { _fileServices = fileService; _slideUpdateManagerService = slideUpdateManagerService; _hostingEnvironment = hostingEnvironment; _tagManagerService = tagManagerService; }
public BooksController(IUserService users, IBookService books, IFilesService files, IDonationsService donations) { this.users = users; this.books = books; this.files = files; this.donations = donations; }
public OrdersController(IOrdersService ordersService, IServicesService servicesService, IFilesService filesService, UserManager <ApplicationUser> userManager) { this.ordersService = ordersService; this.servicesService = servicesService; this.filesService = filesService; this.userManager = userManager; }
public FolderService(GenericRepo <Katalog> folderRepo, IFilesService filesService, GenericRepo <Plik> fileRepo) { _folderRepo = folderRepo; _fileService = filesService; _fileRepo = fileRepo; }
public AssignmentsController(IAssignmentsService assignmentsService, IStudentsService studentsService, UserManager <ApplicationUser> userManager, IFilesService filesService) { this.assignmentsService = assignmentsService; this.studentsService = studentsService; this.userManager = userManager; this.filesService = filesService; }
public ArtistManager(IArtistRepository artistRepository, IMapper mapper, IFilesService filesService, IConfiguration configuration) { _artistRepository = artistRepository; _mapper = mapper; _filesService = filesService; _configuration = configuration; }
public InformationService(IRepository <ImageToReview> dbImage, IDeletableEntityRepository <Review> dbReview, IFilesService filesService, IHtmlSanitizer sanitizer) { this.dbImage = dbImage; this.dbReview = dbReview; this.filesService = filesService; this.sanitizer = sanitizer; }
public ProductService(MyDBContext context, IFilesService filesService, IMapper mapper) { _context = context; _filesService = filesService; _mapper = mapper; allProduct = GetProducts().Result; }
/// <summary> /// Creates a new <see cref="IdeViewModel"/> instance /// </summary> /// <param name="messenger">The <see cref="IMessenger"/> instance to use</param> /// <param name="analyticsService">The <see cref="IAnalyticsService"/> instance to use</param> /// <param name="filesService">The <see cref="IFilesService"/> instance to use</param> /// <param name="filesManagerService">The <see cref="IFilesManagerService"/> instance to use</param> /// <param name="filesHistoryService">The <see cref="IFilesHistoryService"/> instance to use</param> public IdeViewModel(IMessenger messenger, IAnalyticsService analyticsService, IFilesService filesService, IFilesManagerService filesManagerService, IFilesHistoryService filesHistoryService) : base(messenger) { AnalyticsService = analyticsService; FilesService = filesService; FilesManagerService = filesManagerService; FilesHistoryService = filesHistoryService; }
public ChatHub(IContactsService contactsService, IAuthenticationService <int> auth, IChatService chatService, IFilesService filesService, IHubContext <ChatHub> hubContext) { _contactsService = contactsService; _chatService = chatService; _filesService = filesService; _auth = auth; _hubContext = hubContext; }
public ImageService(GifterDbContext dbContext, IOptions <StoreOptions> options, IFilesService filesService) { this.dbContext = dbContext; this.options = options.Value; this.filesService = filesService; }
public AlbumManager(IAlbumRepository albumRepository, IMapper mapper, IFilesService filesService, IConfiguration configuration, IHelper helper) { _albumRepository = albumRepository; _mapper = mapper; _filesService = filesService; _configuration = configuration; _helper = helper; }
public MainPageViewModel(INavigationService navigationService) : base(navigationService) { Title = "PDF File"; DownloadPdfFileCommand = new DelegateCommand(DownloadPdfFile); OpenPdfFileCommand = new DelegateCommand(OpenPdfFile); filesService = DependencyService.Get <IFilesService>(); }
public DefaultMediaManagerApiOperations(IMediaTreeService mediaTree, IImagesService images, IImageService image, IFilesService files, IFileService file) { MediaTree = mediaTree; Images = images; Image = image; Files = files; File = file; }
public DefaultMediaManagerApiOperations(IMediaTreeService mediaTree, IImagesService images, IImageService image, IFilesService files, IFileService file, IFoldersService folders, IFolderService folder) { MediaTree = mediaTree; Folders = folders; Folder = folder; Images = images; Image = image; Files = files; File = file; }
public ReviewsController(IReviewsService reviews, ICategoriesService categories, IFilesService files) { this.reviews = reviews; this.categories = categories; this.files = files; }
public ImportOrder(IFilesService filesService, IOrderService orderService) { _filesService = filesService; _orderService = orderService; }
public HomeController(IOrderService orderService, IFilesService filesService) { _orderService = orderService; _filesService = filesService; }
public void TestFixtureSetUp() { _filesService = new RealFilesService(); _filesFinder = new FilesFinder(_filesService); }
public TutorialsController(ITutorialsService tutorials, IFilesService files) { this.tutorials = tutorials; this.files = files; }
public ChocolateyPackageInformationService(IFileSystem fileSystem, IRegistryService registryService, IFilesService filesService) { _fileSystem = fileSystem; _registryService = registryService; _filesService = filesService; }
public FileController(IFilesService files) { this.files = files; }
public FilesApiController(IFilesService service) { this._filesService = service; }
public FilesController(IFilesService filesService, INotesService notesService, ITaskListsService taskListsService) { _filesService = filesService; _notesService = notesService; _taskListsService = taskListsService; }