public CustomersController(
     ICustomers customers,
     IMapper mapper)
 {
     _customers = customers;
     _mapper    = mapper;
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public XamarinMVVMSampleWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 public XamarinMVVMSampleWebAPI()
     : base()
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
 }
Esempio n. 4
0
 public Warehouse(string folder)
 {
     Directory.CreateDirectory(folder);
     Customers = new CustomerCatalogue(folder);
     Products  = new ProductCatalogue(folder);
     Orders    = new OrderCatalogue(folder);
 }
 public Warehouse(string folder)
 {
     Directory.CreateDirectory(folder);
     Customers = new CustomerCatalogue(folder);
     Products  = new ProductCatalogue(folder);
     Orders    = new OrderCatalogue(folder);
     UpdateOrderReferences(); // Uppdatera referenser för kunder och och produkter för ordrar.
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public XamarinMVVMSampleWebAPI(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
     this._baseUri   = new Uri("https://xamarinmvvmsamplewebapi.azurewebsites.net");
 }
 /// <summary>
 /// Initializes a new instance of the XamarinMVVMSampleWebAPI class.
 /// </summary>
 public XamarinMVVMSampleWebAPI()
     : base()
 {
     this._customers = new Customers(this);
     this._employees = new Employees(this);
     this._orders    = new Orders(this);
     this._baseUri   = new Uri("https://xamarinmvvmsamplewebapi.azurewebsites.net");
 }
Esempio n. 8
0
 /// <param name='operations'>
 /// Reference to the XamMvvmAndWebServices.ICustomers.
 /// </param>
 /// <param name='id'>
 /// Required.
 /// </param>
 public static Customer DeleteCustomer(this ICustomers operations, int id)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICustomers)s).DeleteCustomerAsync(id);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 9
0
 /// <param name='operations'>
 /// Reference to the XamMvvmAndWebServices.ICustomers.
 /// </param>
 public static IList <Customer> GetCustomers(this ICustomers operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICustomers)s).GetCustomersAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 public Orders(
     ICustomers customers,
     IOrderLineFactory orderLineFactory,
     IFulfilment fulfilment)
 {
     _customers        = customers;
     _orderLineFactory = orderLineFactory;
     _fulfilment       = fulfilment;
 }
 public AuthenticateCustomerQueryHandler(
     SignInManager <ApplicationUser> signInManager,
     UserManager <ApplicationUser> userManager,
     ICustomers customers,
     IJwtService jwtService)
 {
     _signInManager = signInManager;
     _userManager   = userManager;
     _customers     = customers;
     _jwtService    = jwtService;
 }
    public SaveQuoteCommandHandlerTests()
    {
        _customers  = NSubstitute.Substitute.For <ICustomers>();
        _products   = NSubstitute.Substitute.For <IProducts>();
        _quotes     = NSubstitute.Substitute.For <IQuotes>();
        _unitOfWork = NSubstitute.Substitute.For <IEcommerceUnitOfWork>();

        _unitOfWork.Customers.ReturnsForAnyArgs(_customers);
        _unitOfWork.Products.ReturnsForAnyArgs(_products);
        _unitOfWork.Quotes.ReturnsForAnyArgs(_quotes);
    }
Esempio n. 13
0
        public void Setup()
        {
            client = new Mock <IProxy>();

            request          = new Mock <BaseRequest>(new Mock <IProxy>().Object);
            request.CallBase = true;

            // Create proxy instance
            customersProxy = new AxosoftAPI.NET.Customers(client.Object);
            customersProxy = new AxosoftAPI.NET.Customers(request.Object);
        }
    public PlaceOrderCommandHandlerTests()
    {
        _customers         = NSubstitute.Substitute.For <ICustomers>();
        _products          = NSubstitute.Substitute.For <IProducts>();
        _quotes            = NSubstitute.Substitute.For <IQuotes>();
        _currencyConverter = Substitute.For <ICurrencyConverter>();
        _unitOfWork        = NSubstitute.Substitute.For <IEcommerceUnitOfWork>();

        _unitOfWork.Customers.ReturnsForAnyArgs(_customers);
        _unitOfWork.Products.ReturnsForAnyArgs(_products);
        _unitOfWork.Quotes.ReturnsForAnyArgs(_quotes);
    }
Esempio n. 15
0
    public EcommerceUnitOfWork(EcommerceDDDContext dbContext,
                               ICustomers customers,
                               IOrders orders,
                               IStoredEvents storedEvents,
                               IProducts products,
                               IPayments payments,
                               IQuotes quotes,
                               IEventSerializer eventSerializer) : base(dbContext)
    {
        Customers    = customers ?? throw new ArgumentNullException(nameof(customers));
        Orders       = orders ?? throw new ArgumentNullException(nameof(orders));
        StoredEvents = storedEvents ?? throw new ArgumentNullException(nameof(storedEvents));
        Products     = products ?? throw new ArgumentNullException(nameof(products));
        Quotes       = quotes ?? throw new ArgumentNullException(nameof(quotes));
        Payments     = payments ?? throw new ArgumentNullException(nameof(payments));

        _eventSerializer = eventSerializer ?? throw new ArgumentNullException(nameof(eventSerializer));
    }
Esempio n. 16
0
        /// <param name='operations'>
        /// Reference to the XamMvvmAndWebServices.ICustomers.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <Customer> > GetCustomersAsync(this ICustomers operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <XamMvvmAndWebServices.Models.Customer> > result = await operations.GetCustomersWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <ContosoConsultancyRestModelsCustomersCustomerModel> GetAllCustomers(this ICustomers operations)
 {
     return(Task.Factory.StartNew(s => ((ICustomers)s).GetAllCustomersAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 18
0
        /// <param name='operations'>
        /// Reference to the XamMvvmAndWebServices.ICustomers.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Customer> DeleteCustomerAsync(this ICustomers operations, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <XamMvvmAndWebServices.Models.Customer> result = await operations.DeleteCustomerWithOperationResponseAsync(id, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IList <ContosoConsultancyRestModelsCustomersCustomerModel> > GetAllCustomersAsync(this ICustomers operations, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetAllCustomersWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 20
0
        /// <param name='operations'>
        /// Reference to the XamMvvmAndWebServices.ICustomers.
        /// </param>
        /// <param name='id'>
        /// Required.
        /// </param>
        /// <param name='customer'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <object> PutCustomerAsync(this ICustomers operations, int id, Customer customer, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <object> result = await operations.PutCustomerWithOperationResponseAsync(id, customer, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }
 public CustomersController(ICustomers customer)
 {
     _customer = customer;
 }
Esempio n. 22
0
 public ProductReviewService(IProducts products, ICustomers customers)
 {
     _products  = products;
     _customers = customers;
 }
Esempio n. 23
0
 public OrdersService(ShoppingContext dbContext, ISupermarkets superMarkets, ICustomers customers)
 {
     _dbContext    = dbContext;
     _superMarkets = superMarkets;
     _customers    = customers;
 }
 public CustomersController(ICustomers customers, ILogger <CustomersController> logger)
 {
     _customers = customers;
     _logger    = logger;
 }
Esempio n. 25
0
 public FavoriteService(ICustomers customers, IProducts products)
 {
     _customers = customers;
     _products  = products;
 }
Esempio n. 26
0
 public CustomersController(ICustomers customersRep)
 {
     _customersRep = customersRep;
 }
Esempio n. 27
0
 public CustomersController(ICustomers customers)
 {
     _customers = customers;
 }
Esempio n. 28
0
 public UnitOfWork(NorthwindEntities context)
 {
     _context  = context;
     Customers = new CustomerRepository(context);
 }
Esempio n. 29
0
 public void Attach(ICustomers customer)
 {
     _customers.Add(customer);
 }
 public LoanAccounts(ICustomers customer, decimal balance, decimal interesRate)
 {
     this.Customer = customer;
     this.Balance = balance;
     this.InterestRate = interesRate;
 }
 public CustomersService(ICustomers _objCustomers)
 {
     customers = _objCustomers;
 }