/// <summary> /// Конструктор модели-представления /// </summary> /// <param name="context">Контекст данных</param> public ViewModel(IBusinessContext context) { if (DesignerProperties.GetIsInDesignMode(new DependencyObject())) { return; } CompositionTarget.Rendering += CompositionTargetRendering; PlotModel = new PlotModel(); this.context = context; Devices = context.GetDevices(); //Parameter = context.GetParameters(); Measurements = context.GetMeasuremets(); Users = context.GetUsers(); Oscs = new ObservableCollection <Osc>(); ComboColl = new ObservableCollection <int>(); SetUpModel(); TextBlockOfVoltage = "U, В"; TextBlockOfSurnameInMainWindow = Properties.Settings.Default.SettingName; TextBoxNumberOfSupressor = Properties.Settings.Default.SettingNumber.ToString(); IsRadioButtOnceEnabled = true; IsButtonStartEnabled = true; IsRadioButtSerialEnabled = true; IsTextBoxNumberSupEnabled = true; TextBoxCountOfMeasureInDialog = Properties.Settings.Default.SettingCount; TextBoxPeriodOfMeasureInDialog = Properties.Settings.Default.SettingPeriod; ComboBoxSurnameInDialog = Properties.Settings.Default.SettingName; TextBlockMessageFromServer = "Статус:"; }
public AccountBsMock(IBusinessContext businessContext , IAccountRepository account , IProfileRepository profile , ICreateNewOccurrence occurrence , ISendWelcomeEmail email) : base(businessContext, account, profile, occurrence, email) { }
/// <summary> /// 构造 /// </summary> private BusinessContextScope(BusinessContext context) { _preContext = BusinessContext.GetCurrentContext(); if (context == _preContext) { _preContext = null; } BusinessContext.Current = _nowContext = context; }
protected ProfileBusinessAbstract(IBusinessContext businessContext , IAccountRepository account , ICreateNewOccurrence occurrence , ISendWelcomeEmail email) { this.businessContext = businessContext; this.account = account; this.occurrence = occurrence; this.email = email; }
public (IAccountRepository, IBusinessContext) GetNewAccountRepository() { IRepositoryContextMock Repository = RepositoryContext(); SeedData(Repository.Context); IBusinessContext Business = BusinessContext(Repository); IAccountRepository AccountRepository = new AccountRepMock(Repository); return(AccountRepository, Business); }
public AccountBusiness(ILogger <AccountBusiness> logger , IBusinessContext businessContext , IAccountRepository account , IProfileRepository profile , ICreateNewOccurrence occurrence , ISendWelcomeEmail email) : base(businessContext, account, profile, occurrence, email) { this.logger = logger; }
public (IAccountRepository, IAccountBusiness) GetNewAccount() { IRepositoryContextMock repository = RepositoryContext(); SeedData(repository.Context); IBusinessContext business = BusinessContext(repository); IAccountRepository AccountRepository = new AccountRepMock(repository); IProfileRepository profileRep = new ProfileRepMock(repository); ICreateNewOccurrence occurrence = new OccurrenceSuccessMock(); ISendWelcomeEmail email = new SendMailSuccessMock(); IAccountBusiness AccountBusiness = new AccountBsMock(business, AccountRepository, profileRep, occurrence, email); return(AccountRepository, AccountBusiness); }
public void Setup() { if (dInfo.Exists) { dInfo.Empty(); } Directory.CreateDirectory(_mp3Dir); FileIO.WriteToFile(Mp3FullPath, TestsCommon.Properties.Resources.FileMp3); connString = dBcontroller.CreateDb(DbFullPath); dbContext = new RecordCaseContextForTests(connString, RecordCaseContextSeeder.GetSeeder()); unitOfWork = new UnitOfWork(dbContext, true); businessContext = new BusinessContext(unitOfWork); collectionsContext = new CollectionsContext(CollectionsFullPath); }
public GithubUserService(IBusinessContext bussinessContext, IDataContext dataContext, IGithubClient githubClient) : base(bussinessContext, dataContext) { _githubClient = githubClient; }
public BusinessServiceN(IBusinessContext context) : base(context) { }
public GithubUsersControllerTests() { _businessContexMock = new BusinessContexMock(); }
public ApiControllerBase(IBusinessContext businessContext) { BusinessContext = businessContext; }
public GenericDataService(IBusinessContext businessContext) : base(businessContext) { }
public ModelController(IBusinessContext businessContext, ILogger <ModelController> logger) { _businessContext = businessContext; _logger = logger; }
public BaseDomain(IRootContext context) { Context = new BusinessContext(context); }
public BaseService(IBusinessContext bussinessContext, IDataContext dataContext) { this.BusinessContext = bussinessContext; this.DataContext = dataContext; }
public ServiceBase(IBusinessContext context) { Context = context; }
DoStuff(BusinessContext context) { this.context = context; }
protected BaseService(IBusinessContext businessContext) { BusinessContext = businessContext; }
public BaseService(IRootContext context) { Context = new BusinessContext(context); }
public void Setup() { unitOfWork = new FakeUnitOfWork(); businessContext = new BusinessContext(unitOfWork); }
public RecibosController(IOptions <ServiceConfiguration> configuration, IBusinessContext businessContext) { Configuracion = configuration.Value; BusinessContext = businessContext; }
public MainViewModel(IBusinessContext context) { Customers = new ObservableCollection <Customer>(); this.context = context; }
public GithubUserController(IBusinessContext businessContext) : base(businessContext) { }
public Calculation([NotNull] IBusinessContext businessContext) { _businessContext = businessContext ?? throw new ArgumentNullException(nameof(businessContext)); }
/// <summary> /// 构造 /// </summary> private BusinessContextScope() { _preContext = BusinessContext.GetCurrentContext(); BusinessContext.Current = _nowContext = BusinessContext.CreateContext(); }
public LogMessageController(IOptions <ServiceConfiguration> configuration, IBusinessContext businessContext, IEventBus eventBus) { Configuration = configuration.Value; BusinessContext = businessContext; EventBus = eventBus; }