public DogovorController(IClientLogic client, IRaionLogic raion, IReisLogic reis, IDogovorLogic dogovor) { _client = client; _dogovor = dogovor; _reis = reis; _raion = raion; }
public EventLogic(IEventRepository eventRepository, IClientRepository clientRepository, IClientLogic clientLogic, ILog log) { _eventRepository = eventRepository; _clientRepository = clientRepository; _clientLogic = clientLogic; _log = log; }
public MainViewModel(string login, Guid gameId, IClientLogic clientLogic, List <string> playerNames) : this(login, gameId, clientLogic) { foreach (var name in playerNames) { _table.AddPlayer(new Player(name)); } }
public ServiceClient(IClientLogic logic, IPAddress hostIP, int port, int interfaceId, long ticket) { this.logic = logic; client = new DynamicClient(hostIP, port); tree = new ProtocolTree(); root = new DummyHandler <DummyProtocol>(); auth = new LeafProtocolHandler <AuthenticationProtocol>(); tree.Register(root); tree.Register(auth); tree.Entry(root); tree.ConnectToLeaf(root, auth); tree.Connect(root, logic.ProtocolTree); app = new ApplicationConnectionManager(client, tree, 3000, 6000); auth.NewData += data => { switch (data.statusCode) { case AuthenticationProtocol.StatusCode.Request: Logger.Log("receiving auth request", "ServiceClient"); auth.Send(new AuthenticationProtocol { interfaceId = interfaceId, ticket = ticket, resumeToken = ResumeToken, statusCode = AuthenticationProtocol.StatusCode.Ack }); break; case AuthenticationProtocol.StatusCode.Accept: Logger.Log("auth accepted by the host", "ServiceClient"); ResumeToken = data.resumeToken; ConnectionAccepted?.Invoke(); break; case AuthenticationProtocol.StatusCode.Reject: Logger.Log($"auth rejected by the host, {data.reason}", "ServiceClient", Logger.LogType.WARNING); rejected = true; client.CloseConnection(); app.Dispose(); ConnectionRejected?.Invoke(); break; default: Logger.Log("invalid auth msg from host", "ServiceClient", Logger.LogType.WARNING); break; } }; app.ConnectionLost += () => { if (!rejected) { ConnectionLost?.Invoke(); } }; }
public void GetByFeatureClient() { List <Client> getByFeature; using (var db = new EntitesContext()) { ClearTable.Features(db); ClearTable.KeyFeatures(db); ClearTable.Clients(db); ClearTable.KeyFeatureClients(db); clientL = Get(db); db.Features.AddRange(CreateListEntities.Features()); db.KeyFeatures.AddRange(CreateListEntities.KeyFeatures()); db.Clients.AddRange(CreateListEntities.Clients()); db.KeyFeatureClients.AddRange(CreateListEntities.KeyFeatureClients()); db.SaveChanges(); getByFeature = clientL.GetByFeature(new Feature { Id = 1, Number = 1, Name = "qwe", }); } CollectionAssert.AreEqual(getByFeature, CreateListEntities.Clients()); }
public ReportController(IReisLogic reis, IRaionLogic raion, IDogovorLogic dogovor, IClientLogic client) { _dogovor = dogovor; _reis = reis; _raions = raion; _client = client; }
public FormCreateOrder(IClientLogic logicC, IProductLogic logicP, MainLogic logicM) { InitializeComponent(); this.logicC = logicC; this.logicP = logicP; this.logicM = logicM; }
public void SaveNullClient() { using (var db = new EntitesContext()) { clientL = Get(db); Assert.ThrowsException <ArgumentNullException>(() => clientL.Save(null)); } }
public void RemoveErroneousIdClient() { using (var db = new EntitesContext()) { clientL = Get(db); Assert.ThrowsException <ArgumentException>(() => clientL.Remove(erroneousId)); } }
public FormCreateOrder(IKomlectLogic logicP, IClientLogic logicC, MainLogic logicM) { InitializeComponent(); this.logicP = logicP; this.logicC = logicC; this.logicM = logicM; this.logicC = logicC; }
public ReportLogic(IOrderLogic orderLogic, IPaymentLogic paymentLogic, IServiceLogic serviceLogic, IClientLogic clientLogic) { this.orderLogic = orderLogic; this.paymentLogic = paymentLogic; this.serviceLogic = serviceLogic; this.clientLogic = clientLogic; }
public void GetByNullFeatureClient() { using (var db = new EntitesContext()) { clientL = Get(db); Assert.ThrowsException <ArgumentNullException>(() => clientL.GetByFeature(null)); } }
public void GetByErroneousNumberKeyClient() { using (var db = new EntitesContext()) { clientL = Get(db); Assert.ThrowsException <ArgumentException>(() => clientL.GetByNumberKey(erroneousId)); } }
public FormCreateOrder(IBouquetLogic logicB, ExceptionHandling exceptionHandling, MainLogic logicM, IClientLogic logicC) { InitializeComponent(); this.logicB = logicB; this.exceptionHandling = exceptionHandling; this.logicM = logicM; this.logicC = logicC; }
public GoodsController(IGoodLogic goodLogic, IColorLogic colorLogic, ICategoryLogic categoryLogic, IClientLogic clientLogic) { _goodLogic = goodLogic; _categoryLogic = categoryLogic; _colorLogic = colorLogic; _clientLogic = clientLogic; _goodHelper = new GoodHelper(colorLogic, categoryLogic); }
public ReportLogic(IRequestLogic requestLogic, IOrderLogic orderLogic, IProductLogic productLogic, IDishLogic dishLogic, IClientLogic clientLogic) { this.requestLogic = requestLogic; this.orderLogic = orderLogic; this.productLogic = productLogic; this.dishLogic = dishLogic; this.clientLogic = clientLogic; }
public void GetByNumberKeyNoDBClient() { using (var db = new EntitesContext()) { ClearTable.HaspKeys(db); clientL = Get(db); Assert.IsNull(clientL.GetByNumberKey(2)); } }
public CartController(ICategoryLogic categoryLogic, IColorLogic colorLogic, IGoodLogic goodLogic, IOrderLogic orderLogic, IClientLogic clientLogic, IOrderItemLogic orderItemLogic) { _goodLogic = goodLogic; _categoryLogic = categoryLogic; _colorLogic = colorLogic; _orderLogic = orderLogic; _clientLogic = clientLogic; _orderItemLogic = orderItemLogic; }
public ProposalController(ISuggestorLogic suggestorLogic, IProposalLogic ProposalLogic, IMapper mapper, IClientLogic clientLogic, IUserLogic userLogic, ILogLogic logLogic) { _ProposalLogic = ProposalLogic; _suggestorLogic = suggestorLogic; _mapper = mapper; _clientLogic = clientLogic; _userLogic = userLogic; _logLogic = logLogic; }
public void RemoveNoDBClient() { using (var db = new EntitesContext()) { ClearTable.Clients(db); clientL = Get(db); clientL.Save(CreateNew()); Assert.IsFalse(clientL.Remove(123)); } }
public MainViewModel(string login, Guid gameId, IClientLogic clientLogic) { Login = login; _gameId = gameId; _clientLogic = clientLogic; Window = new MainWindow(); Window.DataContext = this; Init(); }
public FormMain(IProductLogic productLogic, IClientLogic clientLogic) { InitializeComponent(); this.productLogic = productLogic; if (!clientLogic.IsAdmin(new ClientBindingModel { Id = Program.Client.Id })) { пополнитьToolStripMenuItem.Visible = false; } LoadData(); }
public PaymentStripeController( IConfiguration config, IClientLogic clientLogic, ICartLogic cartLogic ) { this.config = config; this.clientLogic = clientLogic; this.cartLogic = cartLogic; StripeConfiguration.ApiKey = config.GetSection("Stripe")["SecretKey"]; }
public void SaveClient() { bool add; using (var db = new EntitesContext()) { ClearTable.Clients(db); clientL = Get(db); add = clientL.Save(CreateNew()); } Assert.IsTrue(add); }
public void GetAllEmptyClient() { var getAll = new List <Client>(); var clientExpected = new List <Client>(); using (var db = new EntitesContext()) { ClearTable.Clients(db); clientL = Get(db); getAll = clientL.GetAll(); } CollectionAssert.AreEqual(getAll, clientExpected); }
public LobbyViewModel(string login) { _login = login; Window = new LobbyWindow(); Window.DataContext = this; clientLogic = new ClientLogic(); clientLogic.EstablishConnection(_login); clientLogic.Client.OnReceiveMessageEvent += ReceivedMessageFromClient; GameTypes = ((GameType[])Enum.GetValues(typeof(GameType))).ToList(); }
public ProductsController ( ILogger <ProductsController> loggerProductsController, IProductManager productManager, ICartLogic cartLogic, IClientLogic clientLogic ) { this.loggerProductsController = loggerProductsController; this.productManager = productManager; this.cartLogic = cartLogic; this.clientLogic = clientLogic; }
public void GetByIdNoDBClient() { Client getById; using (var db = new EntitesContext()) { ClearTable.Clients(db); clientL = Get(db); getById = clientL.GetById(1); } Assert.IsNull(getById); }
public void SaveDuplicateClient() { bool add; Client client = CreateNew(); using (var db = new EntitesContext()) { ClearTable.Clients(db); clientL = Get(db); clientL.Save(client); add = clientL.Save(client); } Assert.IsFalse(add); }
public void GetByIdClient() { Client getById; Client clientExpected = CreateNew(1); using (var db = new EntitesContext()) { ClearTable.Clients(db); clientL = Get(db); clientL.Save(CreateNew()); getById = clientL.GetById(1); } Assert.AreEqual(getById, clientExpected); }
public FormInfoMail(IClientLogic logic) { InitializeComponent(); textBox.Text = "Продуктов недостаточно на складе в указанном количестве. " + "Укажите адрес электронной почты, куда отправится информация о Вашем запросе"; List <ClientViewModel> list = logic.ReadAdmins(); if (list != null) { comboBox.DisplayMember = "Email"; comboBox.ValueMember = "Id"; comboBox.DataSource = list; comboBox.SelectedItem = null; } }
public CourtBookLogic(ObjectContextEntities context, IClientLogic clientService) { _clientService = clientService; _context = context; }
public ClientController(IClientLogic clientLogic) { _clientLogic = clientLogic; }
public ClientController(IClientLogic logic, ILog log) { _logic = logic; _log = log; }