本文整理汇总了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);
});
}
示例2: WatchController
public WatchController(IWatchService watchService, IImageService imageService, IOrderService orderService, IRequestContext requestContext)
{
_watchService = watchService;
_imageService = imageService;
_orderService = orderService;
_requestContext = requestContext;
}
示例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;
}
示例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[]>>>();
}
示例5: DishController
public DishController(IDishService dishservice, IUserService userservice, IDishTypeService dishtypeservice, IImageService imageservice)
{
DishSvc = dishservice;
UserSvc = userservice;
DishTypeSvc = dishtypeservice;
ImageSvc = imageservice;
}
示例6: ArticleController
public ArticleController(IArticleService articleService, IRubricService rubricService, IImageService imageService, ITagService tagService)
{
this.articleService = articleService;
this.rubricService = rubricService;
this.imageService = imageService;
this.tagService = tagService;
}
示例7: ImageController
public ImageController(
IImageProcessor imageProcessor,
IImageService imageService)
{
_imageProcessor = imageProcessor;
_imageService = imageService;
}
示例8: AccountController
public AccountController(IClientService clientService, IRoleService roleService, IUtilisateurService<Client> utilisateurService, IImageService imageService)
{
ClientService = clientService;
RoleService = roleService;
UtilisateurService = utilisateurService;
ImageService = imageService;
}
示例9: EmployeController
public EmployeController(IEmployeService employeService, IRoleService roleService, IUtilisateurService<Employe> utilisateurService, IImageService imageService)
{
EmployeService = employeService;
RoleService = roleService;
UtilisateurService = utilisateurService;
ImageService = imageService;
}
示例10: ActivityController
public ActivityController(IAllReadyDataAccess dataAccess, UserManager<ApplicationUser> userManager, IImageService imageService, IMediator bus)
{
_dataAccess = dataAccess;
_userManager = userManager;
_imageService = imageService;
_bus = bus;
}
示例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);
}
示例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;
}
示例13: AccountController
public AccountController(IUserService userService, ICryptographyService cryptographyService, IEmailService emailService, IImageService imageService)
{
_userService = userService;
_cryptographyService = cryptographyService;
_emailService = emailService;
_imageService = imageService;
}
示例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;
}
示例15: CreditRequestService
public CreditRequestService(IUnitOfWork iUnitOfWork, IImageService iImageService,
ICustomerService iCustomerService, IValidationService iValidationService)
{
_iUnitOfWork = iUnitOfWork;
_iImageService = iImageService;
_iCustomerService = iCustomerService;
_iValidationService = iValidationService;
}