public ServiceController(IWorkContext workContext, IServicesService servicesService, IUploadService uploadService, BanobatDbContext dbContext) : base(workContext)
 {
     _workContext     = workContext;
     _servicesService = servicesService;
     _uploadService   = uploadService;
     _dbContext       = dbContext;
 }
Пример #2
0
 public DashboardController(IUnitOfWork <DatabaseContext> db, UserManager <User> userManager, IUploadService uploadService, IUtilities utilities)
 {
     _db            = db;
     _userManager   = userManager;
     _uploadService = uploadService;
     _utilities     = utilities;
 }
Пример #3
0
 public ProductController(IUnitOfWork <DatabaseContext> db, IMapper mapper, IUploadService uploadService, IUtilities utilities)
 {
     _db            = db;
     _mapper        = mapper;
     _uploadService = uploadService;
     _utilities     = utilities;
 }
        public ProfileController(
            HttpServerUtilityBase server,
            IUploadService <Photo> uploadPhotoService,
            IUploadService <Tag> uploadTagService,
            IPhotoService photoService,
            IPhotoUploader photoUploader,
            ITagsHelper tagsHelper,
            IUserProvider userProvider,
            IPagingProvider <PhotoViewModel> pagingProvider)
        {
            Guard.WhenArgument(server, "server").IsNull().Throw();
            Guard.WhenArgument(uploadPhotoService, "uploadPhotoService").IsNull().Throw();
            Guard.WhenArgument(uploadTagService, "uploadTagService").IsNull().Throw();
            Guard.WhenArgument(photoService, "photoService").IsNull().Throw();
            Guard.WhenArgument(photoUploader, "photoUploader").IsNull().Throw();
            Guard.WhenArgument(tagsHelper, "tagsHelper").IsNull().Throw();
            Guard.WhenArgument(userProvider, "userProvider").IsNull().Throw();
            Guard.WhenArgument(pagingProvider, "pagingProvider").IsNull().Throw();

            this.server             = server;
            this.uploadPhotoService = uploadPhotoService;
            this.uploadTagService   = uploadTagService;
            this.photoService       = photoService;
            this.photoUploader      = photoUploader;
            this.tagsHelper         = tagsHelper;
            this.userProvider       = userProvider;
            this.pagingProvider     = pagingProvider;
        }
Пример #5
0
 public UploadController(
     IUploadService service,
     IStatusCodeFactory <IActionResult> codeFactory)
 {
     _codeFactory = codeFactory ?? throw new ArgumentNullException("Code factory is null");
     _service     = service ?? throw new ArgumentNullException("Upload service is null");
 }
Пример #6
0
 public QuestionService(IQuestionRepository repository, IUploadService uploadService, IOptions <UploadOptions> uploadOptions, IOptions <ConnectionOptions> connexionOptions)
 {
     _repository       = repository;
     _uploadService    = uploadService;
     _uploadOptions    = uploadOptions;
     _connexionOptions = connexionOptions;
 }
Пример #7
0
 public ProfileController(UserManager <ApplicationUser> userManager, IApplicationUserService applicationUserService, IUploadService uploadService, IConfiguration configuration)
 {
     _userManager            = userManager;
     _applicationUserService = applicationUserService;
     _uploadService          = uploadService;
     _configuration          = configuration;
 }
Пример #8
0
 public VideosController(IOptions <VideoServerOptions> options, IUploadService uploadService,
                         IVideoEncodingService encodingService)
 {
     _options         = options.Value;
     _uploadService   = uploadService;
     _encodingService = encodingService;
 }
Пример #9
0
        public ContentController(
            IContentService contentService,
            IContentFileService contentFileService,
            ICategoryService categoryService,
            ITagService tagService,
            IContentListService contentListService,
            IUploadService uploadService,
            IHostingEnvironment hostingEnvironment,
            IContentSelectedService contentSelectedService,
            IUnitOfWork uow,
            ILogger<ContentController> logger,
            IMapper mapper
        )
        {
            _contentListService = contentListService;
            _contentService = contentService;
            _contentFileService = contentFileService;
            _categoryService = categoryService;
            _tagService = tagService;
            _uow = uow;
            _logger = logger;
            _logger.CheckArgumentIsNull(nameof(_logger));
            _uploadService = uploadService;
            _hostingEnvironment = hostingEnvironment;
            _mapper = mapper;
            _contentSelectedService = contentSelectedService;

        }
Пример #10
0
 public ScottFalboCodeModel(IAdmin admin, IUploadService upload, PortfolioDbContext context, IArtAdmin art)
 {
     _admin   = admin;
     _upload  = upload;
     _context = context;
     _art     = art;
 }
Пример #11
0
 public DataProcessor(
     ITimeService timeService,
     IUploadService uploadService)
 {
     this._timeService   = timeService;
     this._uploadService = uploadService;
 }
 public JournalController(IJournalService journalService, IHostingEnvironment hostingEnvironment,
                          IUploadService uploadService)
 {
     _journalService     = journalService;
     _hostingEnvironment = hostingEnvironment;
     _uploadService      = uploadService;
 }
Пример #13
0
 public UploadController(Context context, IApplicationConfigurationService applicationConfigurationService, IAuthService authService, IUploadService uploadService)
 {
     this.context = context;
     this.applicationConfigurationService = applicationConfigurationService;
     this.authService   = authService;
     this.uploadService = uploadService;
 }
 public PersonController(IPersonService personService, IMapper mapper, IUploadService uploadService, BanobatDbContext dbContext)
 {
     _personService = personService;
     _mapper        = mapper;
     _uploadService = uploadService;
     _dbContext     = dbContext;
 }
 public ConsultancyService(BanobatDbContext dbContext, INotificationService notificationService, IUploadService uploadService, IOptions <AppSettings> options)
 {
     _dbContext           = dbContext;
     _notificationService = notificationService;
     _uploadService       = uploadService;
     _options             = options;
 }
Пример #16
0
 public ProfilesController(UserManager <ApplicationUser> usersManager, IApplicationUsersService usersService, IUploadService uploadService, IConfiguration configuration)
 {
     this.usersManager  = usersManager;
     this.usersService  = usersService;
     this.uploadService = uploadService;
     this.configuration = configuration;
 }
Пример #17
0
 public ContentController(IUnitOfWork unitOfWork,
                          ISeoUrlMaker seoUrlMaker,
                          [Dependency("PhotoUpload")] IUploadService uploadService) : base(unitOfWork)
 {
     _uploadService = uploadService;
     _seoUrlMaker   = seoUrlMaker;
 }
Пример #18
0
        public ProfileController(
            HttpServerUtilityBase server,
            IUploadService <Tag> uploadTagService,
            IModifyService <Photo> modifyPhotoService,
            IDeleteService <Photo> deletePhotoService,
            IPhotoService photoService,
            IPhotoUploader photoUploader,
            IPhotoConverter photoConverter,
            ITagsHelper tagsHelper)
        {
            Guard.WhenArgument(server, "server").IsNull().Throw();
            Guard.WhenArgument(uploadTagService, "uploadTagService").IsNull().Throw();
            Guard.WhenArgument(modifyPhotoService, "modifyPhotoService").IsNull().Throw();
            Guard.WhenArgument(deletePhotoService, "deletePhotoService").IsNull().Throw();
            Guard.WhenArgument(photoService, "photoService").IsNull().Throw();
            Guard.WhenArgument(photoUploader, "photoUploader").IsNull().Throw();
            Guard.WhenArgument(photoConverter, "photoConverter").IsNull().Throw();
            Guard.WhenArgument(tagsHelper, "tagsHelper").IsNull().Throw();

            this.server             = server;
            this.uploadTagService   = uploadTagService;
            this.modifyPhotoService = modifyPhotoService;
            this.deletePhotoService = deletePhotoService;
            this.photoService       = photoService;
            this.photoUploader      = photoUploader;
            this.photoConverter     = photoConverter;
            this.tagsHelper         = tagsHelper;
        }
Пример #19
0
        private void frmOriginalImg_Load(object sender, EventArgs e)
        {
            //this.pic_Loading.ImageLocation = "Skin\\SysImg\\loading.gif";

            if (_thumbnailID != 0)
            {
                pic_Loading.Visible = true;

                //dlService.GetOriginalImageByThumbnailAsync(_thumbnailID);
                //dlService.GetOriginalImageByThumbnailCompleted += new Entity.CarWebService.GetOriginalImageByThumbnailCompletedEventHandler(dlService_GetOriginalImageByThumbnailCompleted);

                IUploadService us      = FactoryService.CreateInstance();
                byte[]         imgByte = us.GetOriginalImage(_thumbnailID);
                if (imgByte != null)
                {
                    Stream s    = new MemoryStream(imgByte);
                    Image  _pic = Image.FromStream(s);
                    pictureBox1.Image = _pic;


                    this.Width  = _pic.Width;
                    this.Height = _pic.Height;

                    if (_pic.Width > 800 && _pic.Height > 600)
                    {
                        this.Width  = 800;
                        this.Height = 600;
                    }

                    pic_Loading.Visible = false;
                }
            }
        }
Пример #20
0
        public SoundVmFactory(
            IDownloadManager downloadManager,
            IMixMediaPlayerService player,
            ITelemetry telemetry,
            IPreviewService previewService,
            ISoundDataProvider soundDataProvider,
            ISoundMixService soundMixService,
            IUserSettings userSettings,
            IIapService iapService,
            IUploadService uploadService,
            IRenamer renamer)
        {
            Guard.IsNotNull(downloadManager, nameof(downloadManager));
            Guard.IsNotNull(soundDataProvider, nameof(soundDataProvider));
            Guard.IsNotNull(player, nameof(player));
            Guard.IsNotNull(telemetry, nameof(telemetry));
            Guard.IsNotNull(iapService, nameof(iapService));
            Guard.IsNotNull(previewService, nameof(previewService));
            Guard.IsNotNull(userSettings, nameof(userSettings));
            Guard.IsNotNull(soundMixService, nameof(soundMixService));
            Guard.IsNotNull(renamer, nameof(renamer));
            Guard.IsNotNull(uploadService, nameof(uploadService));

            _userSettings      = userSettings;
            _downloadManager   = downloadManager;
            _previewService    = previewService;
            _soundMixService   = soundMixService;
            _iapService        = iapService;
            _soundDataProvider = soundDataProvider;
            _player            = player;
            _renamer           = renamer;
            _telemetry         = telemetry;
            _uploadService     = uploadService;
        }
Пример #21
0
 public UploadController(
     IConfiguration configuration,
     IUploadService uploadService)
 {
     _configuration = configuration;
     _uploadService = uploadService;
 }
Пример #22
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="TransferService"/> class.
 /// </summary>
 public TransferService(
     IUploadService uploadService     = null,
     IDownloadService downloadService = null)
 {
     Uploads   = uploadService;
     Downloads = downloadService;
 }
Пример #23
0
        public UploadFormViewModel(
            IUploadService uploadService,
            IAccountManager accountManager,
            IFilePicker filePicker,
            ITelemetry telemetry,
            IOnlineSoundDataProvider onlineSoundDataProvider)
        {
            Guard.IsNotNull(uploadService, nameof(uploadService));
            Guard.IsNotNull(accountManager, nameof(accountManager));
            Guard.IsNotNull(filePicker, nameof(filePicker));
            Guard.IsNotNull(onlineSoundDataProvider, nameof(onlineSoundDataProvider));
            Guard.IsNotNull(telemetry, nameof(telemetry));

            _telemetry               = telemetry;
            _uploadService           = uploadService;
            _accountManager          = accountManager;
            _filePicker              = filePicker;
            _onlineSoundDataProvider = onlineSoundDataProvider;

            SubmitCommand    = new AsyncRelayCommand(SubmitAsync);
            PickSoundCommand = new AsyncRelayCommand(PickSoundFileAsync);

            _onlineSoundDataProvider.UserSoundsFetched += CheckUserListcount;
            _uploadService.SoundDeleted += OnUserSoundDeleted;
        }
Пример #24
0
 public TenantsController(
     ITenantService tenantService,
     IUploadService uploadService)
 {
     this.tenantService = tenantService;
     this.uploadService = uploadService;
 }
 public AddEditProductCommandHandler(IUnitOfWork unitOfWork, IMapper mapper, IUploadService uploadService, IStringLocalizer <AddEditProductCommandHandler> localizer)
 {
     _unitOfWork    = unitOfWork;
     _mapper        = mapper;
     _uploadService = uploadService;
     _localizer     = localizer;
 }
Пример #26
0
 public EmployeeController(IEmployeesService employeesService, ITeamsService teamsService, IUploadService uploadService, IAddressService addressService)
 {
     this.employeesService = employeesService;
     this.teamsService     = teamsService;
     this.uploadService    = uploadService;
     this.addressService   = addressService;
 }
        public UploadedSoundsListViewModel(
            IOnlineSoundDataProvider onlineSoundDataProvider,
            IAccountManager accountManager,
            ISoundVmFactory soundVmFactory,
            ITelemetry telemetry,
            IUploadService uploadService)
        {
            Guard.IsNotNull(onlineSoundDataProvider, nameof(onlineSoundDataProvider));
            Guard.IsNotNull(accountManager, nameof(accountManager));
            Guard.IsNotNull(soundVmFactory, nameof(soundVmFactory));
            Guard.IsNotNull(uploadService, nameof(uploadService));
            Guard.IsNotNull(telemetry, nameof(telemetry));

            _telemetry = telemetry;
            _onlineSoundDataProvider = onlineSoundDataProvider;
            _accountManager          = accountManager;
            _soundVmFactory          = soundVmFactory;
            _uploadService           = uploadService;

            _uploadService.SoundUploaded += OnSoundUploaded;
            _uploadService.SoundDeleted  += OnSoundDeleted;
            LoadCommand = new AsyncRelayCommand(LoadAsync);
            UploadedSounds.CollectionChanged += OnCollectionChanged;
            LoadCommand.PropertyChanged      += OnLoadCommandPropChanged;
        }
Пример #28
0
 public IndexModel(
     IConfiguration configuration,
     IUploadService uploadService)
 {
     _configuration = configuration;
     _uploadService = uploadService;
 }
Пример #29
0
 public PluginController(ExternalAuthenticationSettings externalAuthenticationSettings,
                         IUserActivityService userActivityService,
                         IEventPublisher eventPublisher,
                         IExternalAuthenticationService externalAuthenticationService,
                         ILocalizationService localizationService,
                         IPermissionService permissionService,
                         IPluginFinder pluginFinder,
                         IPluginModelFactory pluginModelFactory,
                         ISettingService settingService,
                         IUploadService uploadService,
                         IWebHelper webHelper,
                         IWidgetService widgetService,
                         WidgetSettings widgetSettings)
 {
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._userActivityService            = userActivityService;
     this._eventPublisher = eventPublisher;
     this._externalAuthenticationService = externalAuthenticationService;
     this._localizationService           = localizationService;
     this._permissionService             = permissionService;
     this._pluginFinder       = pluginFinder;
     this._pluginModelFactory = pluginModelFactory;
     this._settingService     = settingService;
     this._uploadService      = uploadService;
     this._webHelper          = webHelper;
     this._widgetService      = widgetService;
     this._widgetSettings     = widgetSettings;
 }
Пример #30
0
 public PluginController(ExternalAuthenticationSettings externalAuthenticationSettings,
                         ICustomerActivityService customerActivityService,
                         IEventPublisher eventPublisher,
                         ILocalizationService localizationService,
                         IPermissionService permissionService,
                         IPluginFinder pluginFinder,
                         IPluginModelFactory pluginModelFactory,
                         ISettingService settingService,
                         IUploadService uploadService,
                         IWebHelper webHelper,
                         PaymentSettings paymentSettings,
                         ShippingSettings shippingSettings,
                         TaxSettings taxSettings,
                         WidgetSettings widgetSettings)
 {
     this._externalAuthenticationSettings = externalAuthenticationSettings;
     this._customerActivityService        = customerActivityService;
     this._eventPublisher      = eventPublisher;
     this._localizationService = localizationService;
     this._permissionService   = permissionService;
     this._pluginFinder        = pluginFinder;
     this._pluginModelFactory  = pluginModelFactory;
     this._settingService      = settingService;
     this._uploadService       = uploadService;
     this._webHelper           = webHelper;
     this._paymentSettings     = paymentSettings;
     this._shippingSettings    = shippingSettings;
     this._taxSettings         = taxSettings;
     this._widgetSettings      = widgetSettings;
 }
Пример #31
0
 public ProductController(ISettingService settings, ICategoryService categoryService,
     IProductFinder productFinder, IUploadService uploadService)
 {
     this.settings = settings;
     this.categoryService = categoryService;
     this.productFinder = productFinder;
     this.uploadService = uploadService;
 }
Пример #32
0
 public ServiceManager(
     GenreRepository genreRepository,
     Func<Upload, WizardViewModel> makeWizardViewModel,
     IUploadService uploadService)
 {
     _genreRepository = genreRepository;
     _makeWizardViewModel = makeWizardViewModel;
     _uploadService = uploadService;
 }
        public UploadServiceProperties(IUploadService selectedUploadService)
        {
            InitializeComponent();

            this.MinimumSize = this.Size;
            this.SelectedUploadService = selectedUploadService;

            tbUploadServiceName.Text = SelectedUploadService.Name;
            tbUploadServiceUrl.Text = SelectedUploadService.EndpointUrl;

            foreach (var k in SelectedUploadService.UploadValues.Keys)
            {
                dataGridView1.Rows.Add(new [] { k, selectedUploadService.UploadValues[(string)k] });
            }

            tbImageLinkXPath.Text = SelectedUploadService.ImageLinkXPath;
            tbDeleteLinkXPath.Text = SelectedUploadService.DeleteLinkXPath;
        }
Пример #34
0
        private bool DoUpload(IUploadService Service, UploadAttachment a)
        {
            try
            {
                a.Status = UploadAttachment.AttachmentStatus.Uploading;
                a.UploadedUri = Service.UploadAttachment(a, Account);
                a.Status = UploadAttachment.AttachmentStatus.Complete;
                return true;
            }
            catch (WebException we)
            {
                if (we.Response is HttpWebResponse)
                {
                    using (HttpWebResponse response = we.Response as HttpWebResponse)
                    {
                        Localization.LocalizedMessageBox.Show(
                                string.Format(Localization.XmlBasedResourceManager.GetString("The media service encountered an error: {0} {1}"), response.StatusCode, response.StatusDescription)
                            );
                    }
                }
                else
                    Localization.LocalizedMessageBox.Show("An unknown error occurred while uploading.");
            }
            catch (System.Net.Sockets.SocketException se)
            {
                string LocalizedString = null;
                switch (se.NativeErrorCode)
                {
                    // Can't contact server
                    case 10050: // Netdown
                    case 10051: // Unreachable
                    case 10061: // Refused
                    case 10062: // Cannot translate name
                    case 10064: // Host down
                    case 10065: // No route to host
                    case 11001: // Hostname not found
                    case 11002: // Host temporarily not found
                    case 11003: // Non-recoverable host lookup error
                    case 11004: // No data record for name - IP address lookup failure
                        LocalizedString = string.Format(Localization.XmlBasedResourceManager.GetString("The media service can not be reached (Error {0})."), se.NativeErrorCode);
                        break;

                    // Interrupted connection
                    case 10004: // Airplane mode
                    case 10052: // Network Reset
                    case 10053: // Connection Aborted
                    case 10054: // Connection Reset
                        LocalizedString = Localization.XmlBasedResourceManager.GetString("Connection to service lost.");
                        break;

                    // Timeout
                    case 10060: // Timeout
                        LocalizedString = Localization.XmlBasedResourceManager.GetString("Connection timed out.");
                        break;

                    default:
                        LocalizedString = string.Format(Localization.XmlBasedResourceManager.GetString("The media service encountered an error: {0} {1}"), se.NativeErrorCode, se.Message);
                        break;
                }
                Localization.LocalizedMessageBox.Show(
                        LocalizedString
                    );
            }
            catch (InvalidOperationException)
            {
                Localization.LocalizedMessageBox.Show("An internal error occurred while uploading.");
            }
            catch (Exception)
            {
                Localization.LocalizedMessageBox.Show("An unknown error occurred while uploading.");
            }
            a.Status = UploadAttachment.AttachmentStatus.Error;
            return false;
        }
Пример #35
0
        public UploadController(IUploadService uploadService)
        {
            Check.If(uploadService).IsNotNull();

            _uploadService = uploadService;
        }
Пример #36
0
        public static UploadController GetInitialisedUploadController(IUploadService uploadService)
        {
            var controller = new UploadController(uploadService)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }
Пример #37
0
 public UploadController(IUploadService uploadService)
 {
     _uploadService = uploadService;
 }