public InstallController(IInstallationService installationService, IApplicationConfiguration applicationConfiguration, ICryptographyService cryptographyService, ILocalFileProvider localFileProvider) { _installationService = installationService; _applicationConfiguration = applicationConfiguration; _cryptographyService = cryptographyService; _localFileProvider = localFileProvider; }
public ViewAccountant(ILocalFileProvider localFileProvider, IThemeProvider themeProvider, IMinifier minifier) { _localFileProvider = localFileProvider; _themeProvider = themeProvider; _minifier = minifier; _parsedTemplateCache = new ConcurrentDictionary <CachedViewKey, CachedView>(); //set the file system Template.FileSystem = new AppThemeFileSystem(this); //naming convention camelCaseConvention Template.NamingConvention = new CamelCaseNamingConvention(); //register additional types Template.RegisterSafeType(typeof(SelectListItem), new[] { "Text", "Value", "Selected" }); //register all the enums var enumTypes = TypeFinder.EnumTypes(); foreach (var enumType in enumTypes) { Template.RegisterSafeType(enumType, x => x.ToString()); } Template.RegisterFilter(typeof(TextFilters)); Template.RegisterTag <Increment>("increment"); //register global objects GlobalObject.RegisterObject <StoreObject>(GlobalObjectKeys.Store); GlobalObject.RegisterObject <CartObject>(GlobalObjectKeys.Cart); GlobalObject.RegisterObject <BreadcrumbObject>(GlobalObjectKeys.Breadcrumb); GlobalObject.RegisterObject <NavigationObject>(GlobalObjectKeys.Navigation); GlobalObject.RegisterObject <CurrentUserObject>(GlobalObjectKeys.CurrentUser); }
public PluginAccountant(PluginSettings pluginSettings, IPluginInstallerService pluginInstallerService, ILocalFileProvider localFileProvider, ILogger logger, IDataSerializer dataSerializer) { _pluginSettings = pluginSettings; _pluginInstallerService = pluginInstallerService; _localFileProvider = localFileProvider; _logger = logger; _dataSerializer = dataSerializer; }
public ViewComponentManager(IViewComponentSelector viewComponentSelector, IViewComponentHelper viewComponentHelper, IActionContextAccessor actionContextAccessor, IViewAccountant viewAccountant, ITempDataProvider tempDataProvider, ILocalFileProvider localFileProvider) { _viewComponentSelector = viewComponentSelector; _viewComponentHelper = viewComponentHelper; _actionContextAccessor = actionContextAccessor; _viewAccountant = viewAccountant; _tempDataProvider = tempDataProvider; _localFileProvider = localFileProvider; }
public ProductsController(IProductService productService, ICategoryService categoryService, CatalogSettings catalogSettings, IModelMapper modelMapper, IProductRelationService productRelationService, IProductVariantService productVariantService, IDataSerializer dataSerializer, IPriceAccountant priceAccountant, TaxSettings taxSettings, IReviewService reviewService, GeneralSettings generalSettings, IProductModelFactory productModelFactory, IDownloadService downloadService, IUploadService uploadService, ILocalFileProvider localFileProvider) { _productService = productService; _categoryService = categoryService; _catalogSettings = catalogSettings; _modelMapper = modelMapper; _productRelationService = productRelationService; _productVariantService = productVariantService; _dataSerializer = dataSerializer; _priceAccountant = priceAccountant; _taxSettings = taxSettings; _reviewService = reviewService; _generalSettings = generalSettings; _productModelFactory = productModelFactory; _downloadService = downloadService; _uploadService = uploadService; _localFileProvider = localFileProvider; }
public ThemeProvider(ILocalFileProvider localFileProvider, IDataSerializer dataSerializer) { _localFileProvider = localFileProvider; _dataSerializer = dataSerializer; _themeDirectory = ServerHelper.MapPath($"{ApplicationConfig.ThemeDirectory}"); }
public BundleService(ILocalFileProvider localFileProvider, ILogger logger, ICryptographyService cryptographyService) { _localFileProvider = localFileProvider; _logger = logger; _cryptographyService = cryptographyService; }
public InstallationService(IDatabaseSettings databaseSettings, ILocalFileProvider localFileProvider) { _databaseSettings = databaseSettings; _localFileProvider = localFileProvider; _logger = DependencyResolver.Resolve <ILogger>(); }
public MediaPage() { InitializeComponent(); takePhoto.Clicked += async(sender, args) => { if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported) { await DisplayAlert("No Camera", ":( No camera available.", "OK"); return; } var file = await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions { Directory = "Test", SaveToAlbum = true, CompressionQuality = 75, CustomPhotoSize = 50, PhotoSize = PhotoSize.MaxWidthHeight, MaxWidthHeight = 2000, DefaultCamera = CameraDevice.Front }); if (file == null) { return; } string filePath = file.Path; await DisplayAlert("File Location", file.Path, "OK"); image.Source = ImageSource.FromStream(() => { var stream = file.GetStream(); file.Dispose(); return(stream); }); ILocalFileProvider service = DependencyService.Get <ILocalFileProvider>(DependencyFetchTarget.NewInstance); byte[] byteArray = null; using (service as IDisposable) { byteArray = service.GetFileBytes(filePath); } FreeOCR free = new FreeOCR(); string retVal = await free.SendImageAsync(byteArray); lblResult.Text = retVal.Trim(); IDeleteFromFile deleteService = DependencyService.Get <IDeleteFromFile>(DependencyFetchTarget.NewInstance); using (deleteService as IDisposable) { deleteService.DeleteFile(filePath); } image.Source = null; }; pickPhoto.Clicked += async(sender, args) => { if (!CrossMedia.Current.IsPickPhotoSupported) { await DisplayAlert("Photos Not Supported", ":( Permission not granted to photos.", "OK"); return; } var file = await Plugin.Media.CrossMedia.Current.PickPhotoAsync(new Plugin.Media.Abstractions.PickMediaOptions { PhotoSize = Plugin.Media.Abstractions.PhotoSize.Medium, }); if (file == null) { return; } image.Source = ImageSource.FromStream(() => { var stream = file.GetStream(); file.Dispose(); return(stream); }); }; }
public MediaAccountant(ILocalFileProvider localFileProvider, IImageProcessor imageProcessor) { _localFileProvider = localFileProvider; _imageProcessor = imageProcessor; }
public Localizer(ILocalFileProvider localFileProvider, IDataSerializer dataSerializer) { _localFileProvider = localFileProvider; _dataSerializer = dataSerializer; _localizedStrings = new Dictionary <string, LocalizedStringCollection>(); }
public LocalFileService(ILocalFileProvider fileProvider) { _fileProvider = fileProvider; }