예제 #1
0
 /// <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     = "Статус:";
 }
예제 #2
0
 public AccountBsMock(IBusinessContext businessContext
                      , IAccountRepository account
                      , IProfileRepository profile
                      , ICreateNewOccurrence occurrence
                      , ISendWelcomeEmail email)
     : base(businessContext, account, profile, occurrence, email)
 {
 }
예제 #3
0
 /// <summary>
 ///     构造
 /// </summary>
 private BusinessContextScope(BusinessContext context)
 {
     _preContext = BusinessContext.GetCurrentContext();
     if (context == _preContext)
     {
         _preContext = null;
     }
     BusinessContext.Current = _nowContext = context;
 }
예제 #4
0
 protected ProfileBusinessAbstract(IBusinessContext businessContext
                                   , IAccountRepository account
                                   , ICreateNewOccurrence occurrence
                                   , ISendWelcomeEmail email)
 {
     this.businessContext = businessContext;
     this.account         = account;
     this.occurrence      = occurrence;
     this.email           = email;
 }
예제 #5
0
        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;
 }
예제 #7
0
        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);
        }
예제 #8
0
        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);
        }
예제 #9
0
 public GithubUserService(IBusinessContext bussinessContext, IDataContext dataContext, IGithubClient githubClient) : base(bussinessContext, dataContext)
 {
     _githubClient = githubClient;
 }
예제 #10
0
 public BusinessServiceN(IBusinessContext context)
     : base(context)
 {
 }
예제 #11
0
 public GithubUsersControllerTests()
 {
     _businessContexMock = new BusinessContexMock();
 }
예제 #12
0
 public ApiControllerBase(IBusinessContext businessContext)
 {
     BusinessContext = businessContext;
 }
예제 #13
0
 public GenericDataService(IBusinessContext businessContext)
     : base(businessContext)
 {
 }
예제 #14
0
 public ModelController(IBusinessContext businessContext, ILogger <ModelController> logger)
 {
     _businessContext = businessContext;
     _logger          = logger;
 }
예제 #15
0
 public BaseDomain(IRootContext context)
 {
     Context = new BusinessContext(context);
 }
예제 #16
0
 public BaseService(IBusinessContext bussinessContext, IDataContext dataContext)
 {
     this.BusinessContext = bussinessContext;
     this.DataContext     = dataContext;
 }
예제 #17
0
 public ServiceBase(IBusinessContext context)
 {
     Context = context;
 }
 DoStuff(BusinessContext context)
 {
     this.context = context;
 }
예제 #19
0
파일: BaseService.cs 프로젝트: lneves35/HMS
 protected BaseService(IBusinessContext businessContext)
 {
     BusinessContext = businessContext;
 }
예제 #20
0
 public BaseService(IRootContext context)
 {
     Context = new BusinessContext(context);
 }
예제 #21
0
 public void Setup()
 {
     unitOfWork      = new FakeUnitOfWork();
     businessContext = new BusinessContext(unitOfWork);
 }
예제 #22
0
 public RecibosController(IOptions <ServiceConfiguration> configuration, IBusinessContext businessContext)
 {
     Configuracion   = configuration.Value;
     BusinessContext = businessContext;
 }
예제 #23
0
 public MainViewModel(IBusinessContext context)
 {
     Customers    = new ObservableCollection <Customer>();
     this.context = context;
 }
예제 #24
0
 public GithubUserController(IBusinessContext businessContext) : base(businessContext)
 {
 }
예제 #25
0
 public Calculation([NotNull] IBusinessContext businessContext)
 {
     _businessContext = businessContext ?? throw new ArgumentNullException(nameof(businessContext));
 }
예제 #26
0
 /// <summary>
 ///     构造
 /// </summary>
 private BusinessContextScope()
 {
     _preContext             = BusinessContext.GetCurrentContext();
     BusinessContext.Current = _nowContext = BusinessContext.CreateContext();
 }
예제 #27
0
 public LogMessageController(IOptions <ServiceConfiguration> configuration, IBusinessContext businessContext, IEventBus eventBus)
 {
     Configuration   = configuration.Value;
     BusinessContext = businessContext;
     EventBus        = eventBus;
 }