当前位置: 首页>>代码示例>>C#>>正文


C# IImageService类代码示例

本文整理汇总了C#中IImageService的典型用法代码示例。如果您正苦于以下问题:C# IImageService类的具体用法?C# IImageService怎么用?C# IImageService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IImageService类属于命名空间,在下文中一共展示了IImageService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ShareImage

        public void ShareImage(IImageService service)
        {
            string imagePath = GetCapturedImage();

            if (SynchronizationContext.Current == null)
                SynchronizationContext.SetSynchronizationContext(new WindowsFormsSynchronizationContext());

            var worker = Task.Run(() =>
            {
                StartAsyncOutput();
                var uploadTask = service.UploadImage(imagePath);
                uploadTask.ContinueWith(task => HandleError(task.Exception), 
                    TaskContinuationOptions.AttachedToParent | TaskContinuationOptions.OnlyOnFaulted);
                return uploadTask.Result;
            });
            worker.ContinueWith(previousTask => HandleResult(previousTask.Result),
                CancellationToken.None,
                TaskContinuationOptions.OnlyOnRanToCompletion,
                TaskScheduler.FromCurrentSynchronizationContext())
                .ContinueWith(task =>
                {
                    FinishAsyncOutput();
                    File.Delete(imagePath);
                });
        }
开发者ID:ebmp19,项目名称:SnagitImgur,代码行数:25,代码来源:ShareController.cs

示例2: WatchController

 public WatchController(IWatchService watchService, IImageService imageService, IOrderService orderService, IRequestContext requestContext)
 {
     _watchService = watchService;
     _imageService = imageService;
     _orderService = orderService;
     _requestContext = requestContext;
 }
开发者ID:TregubovAndrew,项目名称:MvcWatchStore,代码行数:7,代码来源:WatchController.cs

示例3: ImageDimensionMinValidator

 /// <summary>
 /// Initializes a new instance of the <see cref="ImageDimensionMinValidator"/> class.
 /// </summary>
 /// <param name="width">The width.</param>
 /// <param name="height">The height.</param>
 /// <param name="imageService">The image service.</param>
 public ImageDimensionMinValidator(int width, int height, IImageService imageService)
     : base(Errors.ImageDimensionMinNotValid)
 {
     this.Width = width;
     this.Height = height;
     this.ImageService = imageService;
 }
开发者ID:Mike343,项目名称:Netcoders,代码行数:13,代码来源:ImageDimensionMinValidator.cs

示例4: MemoryCachedImageService

 public MemoryCachedImageService(IImageService serviceToCache)
 {
     this.serviceToCache = serviceToCache;
     isLoading = new Dictionary<Uri, bool>();
     images = new Dictionary<Uri, byte[]>();
     callbacks = new Dictionary<Uri, List<Action<byte[]>>>();
 }
开发者ID:Smeedee,项目名称:Smeedee-Mobile,代码行数:7,代码来源:MemoryCachedImageService.cs

示例5: DishController

 public DishController(IDishService dishservice, IUserService userservice, IDishTypeService dishtypeservice, IImageService imageservice)
 {
     DishSvc = dishservice;
     UserSvc = userservice;
     DishTypeSvc = dishtypeservice;
     ImageSvc = imageservice;
 }
开发者ID:damienpuig,项目名称:Driveat-Csharp,代码行数:7,代码来源:DishController.cs

示例6: ArticleController

 public ArticleController(IArticleService articleService, IRubricService rubricService, IImageService imageService, ITagService tagService)
 {
     this.articleService = articleService;
     this.rubricService = rubricService;
     this.imageService = imageService;
     this.tagService = tagService;
 }
开发者ID:deyantodorov,项目名称:Healthy,代码行数:7,代码来源:ArticleController.cs

示例7: ImageController

 public ImageController(
     IImageProcessor imageProcessor,
     IImageService imageService)
 {
     _imageProcessor = imageProcessor;
     _imageService = imageService;
 }
开发者ID:JLeger,项目名称:Image-Bank-MVC,代码行数:7,代码来源:ImageController.cs

示例8: AccountController

 public AccountController(IClientService clientService, IRoleService roleService, IUtilisateurService<Client> utilisateurService, IImageService imageService)
 {
     ClientService = clientService;
     RoleService = roleService;
     UtilisateurService = utilisateurService;
     ImageService = imageService;
 }
开发者ID:damienpuig,项目名称:SafeDriving,代码行数:7,代码来源:AccountController.cs

示例9: EmployeController

 public EmployeController(IEmployeService employeService, IRoleService roleService, IUtilisateurService<Employe> utilisateurService, IImageService imageService)
 {
     EmployeService = employeService;
     RoleService = roleService;
     UtilisateurService = utilisateurService;
     ImageService = imageService;
 }
开发者ID:damienpuig,项目名称:SafeDriving,代码行数:7,代码来源:EmployeController.cs

示例10: ActivityController

 public ActivityController(IAllReadyDataAccess dataAccess, UserManager<ApplicationUser> userManager, IImageService imageService, IMediator bus)
 {
     _dataAccess = dataAccess;
     _userManager = userManager;
     _imageService = imageService;
     _bus = bus;
 }
开发者ID:CarlHA,项目名称:allReady,代码行数:7,代码来源:ActivityAdminController.cs

示例11: FlickrSearchViewModel

        public FlickrSearchViewModel(IImageService imageService)
        {
            Images = new ReactiveList<SearchResultViewModel>();

            var canExecute = this.WhenAnyValue(x => x.SearchText)
                .Select(x => !String.IsNullOrWhiteSpace(x));

            Search = ReactiveCommand.CreateAsyncObservable(
                canExecute,
                _ =>
                {
                    Images.Clear();
                    ShowError = false;
                    return imageService.GetImages(SearchText);
                });

            Search.Subscribe(images => Images.Add(images));

            Search.ThrownExceptions.Subscribe(_ => ShowError = true);

            isLoading = Search.IsExecuting.ToProperty(this, vm => vm.IsLoading);

            canEnterSearchText = this.WhenAnyValue(x => x.IsLoading)
                .Select(x => !x)
                .ToProperty(this, vm => vm.CanEnterSearchText);
        }
开发者ID:reactiveui-forks,项目名称:ReactiveFlickr,代码行数:26,代码来源:FlickrSearchViewModel.cs

示例12: EstatesController

 /// <summary>
 /// Initializes a new instance of the <see cref="EstatesController" /> class.
 /// </summary>
 /// <param name="unitsRepository">The units repository.</param>
 /// <param name="imageService">The image service.</param>
 /// <param name="accountService">The account service.</param>
 /// <param name="unitFinder">The unit finder.</param>
 public EstatesController(IRepository<Unit> unitsRepository, IImageService imageService, IAccountService accountService, IUnitFinderService unitFinder)
 {
     this.unitsRepository = unitsRepository;
     this.imageService = imageService;
     this.accountService = accountService;
     this.unitFinder = unitFinder;
 }
开发者ID:eugenzyx,项目名称:Estates,代码行数:14,代码来源:EstatesController.cs

示例13: AccountController

 public AccountController(IUserService userService, ICryptographyService cryptographyService, IEmailService emailService, IImageService imageService)
 {
     _userService = userService;
     _cryptographyService = cryptographyService;
     _emailService = emailService;
     _imageService = imageService;
 }
开发者ID:salemano,项目名称:ConferenceApp,代码行数:7,代码来源:AccountController.cs

示例14: ServicesController

 /// <summary>
 /// Initializes a new instance of the <see cref="ServicesController"/> class.
 /// </summary>
 /// <param name="imageService">The image service.</param>
 /// <param name="imageConverter">The image converter.</param>
 /// <param name="queueFileService">The queue file service.</param>
 public ServicesController(IImageService imageService, 
     IImageConverter imageConverter, IQueueFileService queueFileService)
 {
     _imageConverter = imageConverter;
     _queueFileService = queueFileService;
     _imageService = imageService;
 }
开发者ID:chuckconway,项目名称:the-memorable-moments,代码行数:13,代码来源:ServicesController.cs

示例15: CreditRequestService

 public CreditRequestService(IUnitOfWork iUnitOfWork, IImageService iImageService, 
     ICustomerService iCustomerService, IValidationService iValidationService)
 {
     _iUnitOfWork = iUnitOfWork;
     _iImageService = iImageService;
     _iCustomerService = iCustomerService;
     _iValidationService = iValidationService;
 }
开发者ID:kateEvstratenko,项目名称:Bank,代码行数:8,代码来源:CreditRequestService.cs


注:本文中的IImageService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。