コード例 #1
0
 public CustomersViewModel(SimpleContainer simpleContainer, IWindowManager windowManager, ICustomerAccess customerAccess)
 {
     _container     = simpleContainer;
     _windowManager = windowManager;
     _customers     = customerAccess;
     NewCustomer    = new CustomerModel();
 }
コード例 #2
0
 public ProjectModel(Project project, ICustomerAccess customerAccess)
 {
     Id              = project.Id;
     Name            = project.Name;
     Status          = project.Status;
     Comment         = project.Comment;
     CustomerName    = project.Customer.Name;
     _customerAccess = customerAccess;
 }
コード例 #3
0
 public ProjectListViewModel(SimpleContainer simpleContainer, IWindowManager windowManager, IEventAggregator eventAggregator,
                             IProjectAccess projectAccess, ICustomerAccess customerAccess)
 {
     _container      = simpleContainer;
     _projectAccess  = projectAccess;
     _customerAccess = customerAccess;
     _windowManager  = windowManager;
     eventAggregator.Subscribe(this);
 }
コード例 #4
0
        public CustomerDetailsViewModel_Tests()
        {
            var customerAccessMock = new Mock <ICustomerAccess>();

            customerAccessMock
            .Setup(x => x.UpdateCustomer(It.IsAny <Customer>()))
            .ReturnsAsync(true);

            _customerAccess = customerAccessMock.Object;

            var eventAggregatorMock = new Mock <IEventAggregator>();

            _events = eventAggregatorMock.Object;
        }
コード例 #5
0
        public CustomersViewModel_Tests()
        {
            var simpleContainerMock = new Mock <SimpleContainer>();

            _container = simpleContainerMock.Object;

            var windowManagerMock = new Mock <IWindowManager>();

            _windowManager = windowManagerMock.Object;

            var customerList = GenerateCustomers();

            var customerAccessMock = new Mock <ICustomerAccess>();

            customerAccessMock
            .Setup(x => x.GetCustomers())
            .ReturnsAsync(customerList);
            customerAccessMock
            .Setup(x => x.AddCustomer(It.IsAny <Customer>()))
            .ReturnsAsync(true);

            _customerAccess = customerAccessMock.Object;
        }
コード例 #6
0
 public ProjectModel(ICustomerAccess customerAccess)
 {
     _customerAccess = customerAccess;
 }
コード例 #7
0
 public ProjectDetailsViewModel(IEventAggregator eventAggregator, ICustomerAccess customerAccess, IProjectAccess projectAccess)
 {
     _events         = eventAggregator;
     _customerAccess = customerAccess;
     _projectAccess  = projectAccess;
 }
コード例 #8
0
 public CustomerService(ICustomerAccess customerAccess, ICustomerSubscriptionAccess subscriptionAccess)
 {
     _customerAccess = customerAccess;
     _subscriptionAccess = subscriptionAccess;
 }
コード例 #9
0
 public CustomerDetailsViewModel(IEventAggregator eventAggregator, ICustomerAccess customerAccess)
 {
     _events    = eventAggregator;
     _customers = customerAccess;
 }
コード例 #10
0
 public CheckOutController(ISqlServerAccess dataAccess, ICustomerAccess customerAccess)
 {
     this.reservationAccess = dataAccess;
     this.customerAccess    = customerAccess;
 }
コード例 #11
0
 public CustomerService(ICustomerAccess customerAccess, ICustomerSubscriptionAccess subscriptionAccess)
 {
     _customerAccess     = customerAccess;
     _subscriptionAccess = subscriptionAccess;
 }