Exemplo n.º 1
0
 public RestPoolService(ISettingsService settingsService)
 {
     IdentityApi = RestService.For <IIdentityApi>(HttpClientFactory.Create(ApiConstants.BaseApiUrl));
     AccountApi  = RestService.For <IAccountApi>(HttpClientFactory.Create(ApiConstants.BaseApiUrl));
     AnuntApi    = RestService.For <IAnuntApi>(HttpClientFactory.Create(ApiConstants.BaseApiUrl));
     CommentsApi = RestService.For <ICommentsApi>(HttpClientFactory.Create(ApiConstants.BaseApiUrl));
 }
 public ApiFactory(IBasketApi basketApi, IOrderApi orderApi, IUsersApi usersApi, IProductApi productApi, ICommentsApi commentsApi)
 {
     _basketApi   = basketApi;
     _orderApi    = orderApi;
     _usersApi    = usersApi;
     _productApi  = productApi;
     _commentsApi = commentsApi;
 }
Exemplo n.º 3
0
 public ProductDetailModel(IApiFactory factory, IWebHostEnvironment env, IMapper mapper)
 {
     _productApi  = factory.ProductApi ?? throw new ArgumentNullException(nameof(_productApi));
     _basketApi   = factory.BasketApi ?? throw new ArgumentNullException(nameof(_basketApi));
     _commentsApi = factory.CommentsApi ?? throw new ArgumentNullException(nameof(_commentsApi));
     _mapper      = mapper;
     _env         = env;
 }
Exemplo n.º 4
0
        public NewsFeedStorage(IPublicationsApi publicationsApi, ICommentsApi commentsApi, IReactionsApi reactionsApi, ICurrentUserProvider currentUserProvider)
        {
            this.publicationsApi     = publicationsApi;
            this.commentsApi         = commentsApi;
            this.reactionsApi        = reactionsApi;
            this.currentUserProvider = currentUserProvider;

            Reactions = new NewsFeedReactionsStorage(reactionsApi);
            Comments  = new NewsFeedCommentsStorage(commentsApi);
        }
Exemplo n.º 5
0
 public NewsFeedStorage(IPublicationsApi publicationsApi, ICommentsApi commentsApi, IReactionsApi reactionsApi)
 {
     this.publicationsApi = publicationsApi;
     this.commentsApi     = commentsApi;
     this.reactionsApi    = reactionsApi;
 }
 public NewsFeedCommentsStorage(ICommentsApi commentsApi)
 {
     this.commentsApi = commentsApi;
 }