public ApiRequester( IServiceUriBuilder serviceUriBuilder, IAuthDataRetriever authDataRetriever, IApiEndpointFactory apiEndpointFactory ) { _serviceUriBuilder = serviceUriBuilder; _authDataRetriever = authDataRetriever; _apiEndpointFactory = apiEndpointFactory; }
public GalleryPackageService(IOrchardServices orchardServices, IServiceUriBuilder serviceUriBuilder, IPackageService packageService, IUserkeyService userKeyService) { _serviceUriBuilder = serviceUriBuilder; _packageService = packageService; _orchardServices = orchardServices; _userKeyService = userKeyService; T = NullLocalizer.Instance; _serviceRoot = new Lazy<string>(() =>_orchardServices.WorkContext.CurrentSite.As<GallerySettingsPart>().ServiceRoot); }
public virtual async Task <HttpResponseMessage> GetAsync( string path, Cookie authCookie, IServiceUriBuilder serviceUriBuilder ) { if (string.IsNullOrWhiteSpace(path)) { throw new ArgumentNullException(path); } SetCookie(authCookie); var uri = serviceUriBuilder.FromPath(path, Configuration, _apiVersionProvider); return(await _client.GetAsync(uri)); }
public PackageController(IOrchardServices services, ITaxonomyService taxonomyService, IGalleryPackageService galleryPackageService, IPackageService packageService, IPackageViewModelMapper packageViewModelMapper, IServiceUriBuilder serviceUriBuilder, IUserPackageAuthorizer userPackageAuthorizer, IParameterFormatValidator parameterFormatValidator, IPackageVisitTracker packageVisitTracker, IGalleryPackagePublishingService packagePublishingService, IPackagePartPublishingService packagePartPublishingService) { _services = services; _packagePartPublishingService = packagePartPublishingService; _userPackageAuthorizer = userPackageAuthorizer; _parameterFormatValidator = parameterFormatValidator; _taxonomyService = taxonomyService; _galleryPackageService = galleryPackageService; _packageService = packageService; _packageViewModelMapper = packageViewModelMapper; _packageVisitTracker = packageVisitTracker; _packagePublishingService = packagePublishingService; T = NullLocalizer.Instance; }
public async Task <HttpResponseMessage> PostAsync(string path, HttpContent data, Cookie authCookie, IServiceUriBuilder serviceUriBuilder) { GivenCoockie = authCookie; GivenData = data; Path = path; return(new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(_value) }); }