Пример #1
0
 public CategoriesController(
     ICategoriesService categoriesService,
     IErrorsService errorService)
 {
     this.categoryService = categoriesService;
     this.errorService    = errorService;
 }
Пример #2
0
        public async Task ErrorsService(int number, object[] arguments, string errorUri)
        {
            WampPlayground playground = new WampPlayground();

            var channel = await SetupService <ErrorsService>(playground);

            IErrorsService proxy =
                channel.RealmProxy.Services.GetCalleeProxyPortable <IErrorsService>();

            Task <int> result = proxy.SqrtAsync(number);

            if (arguments == null)
            {
                Assert.That(result.Exception, Is.Null);
                Assert.That(result.IsCompleted, Is.True);
            }
            else
            {
                AggregateException exception       = result.Exception;
                Exception          actualException = exception.InnerException;
                Assert.That(actualException, Is.TypeOf <WampException>());
                WampException wampException = actualException as WampException;

                Assert.That(wampException.Arguments,
                            Is.EquivalentTo(arguments.Select(x => playground.Binding.Formatter.Serialize(x)))
                            .Using(playground.EqualityComparer));

                Assert.That(wampException.ErrorUri, Is.EqualTo(errorUri));
            }
        }
Пример #3
0
 public BrandsController(
     IBrandsService brandService,
     IErrorsService errorService)
 {
     this.brandService = brandService;
     this.errorService = errorService;
 }
Пример #4
0
 public ProductsController(
     IProductsService productsService,
     IMapper mapper,
     IErrorsService errorService)
 {
     this.productsService = productsService;
     this.mapper          = mapper;
     this.errorService    = errorService;
 }
 public DeletePersonalDataModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     ILogger <DeletePersonalDataModel> logger,
     IErrorsService errorsService)
 {
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.logger        = logger;
     this.errorsService = errorsService;
 }
Пример #6
0
 public OrdersController(
     IUsersService usersService,
     IOrdersService orderService,
     IShoppingCartsService shoppingCartService,
     IMapper mapper,
     IErrorsService errorService)
 {
     this.usersService        = usersService;
     this.orderService        = orderService;
     this.shoppingCartService = shoppingCartService;
     this.mapper       = mapper;
     this.errorService = errorService;
 }
Пример #7
0
 public ProductsController(
     IProductsService productsService,
     ICategoriesService categoriesService,
     IBrandsService brandsService,
     IMapper mapper,
     IErrorsService errorService)
 {
     this.productsService   = productsService;
     this.categoriesService = categoriesService;
     this.brandsService     = brandsService;
     this.mapper            = mapper;
     this.errorService      = errorService;
 }
Пример #8
0
 public ErrorsController(IErrorLogService _errorLogService, IErrorsService _errorService)
 {
     errorService    = _errorService;
     errorLogService = _errorLogService;
 }