Example #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     = "Статус:";
 }
Example #2
0
 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;
 }
Example #4
0
 protected ProfileBusinessAbstract(IBusinessContext businessContext
                                   , IAccountRepository account
                                   , ICreateNewOccurrence occurrence
                                   , ISendWelcomeEmail email)
 {
     this.businessContext = businessContext;
     this.account         = account;
     this.occurrence      = occurrence;
     this.email           = email;
 }
Example #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;
 }
Example #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);
        }
Example #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);
        }
 public GithubUserService(IBusinessContext bussinessContext, IDataContext dataContext, IGithubClient githubClient) : base(bussinessContext, dataContext)
 {
     _githubClient = githubClient;
 }
Example #10
0
 public BusinessServiceN(IBusinessContext context)
     : base(context)
 {
 }
Example #11
0
 public GithubUsersControllerTests()
 {
     _businessContexMock = new BusinessContexMock();
 }
Example #12
0
 public ApiControllerBase(IBusinessContext businessContext)
 {
     BusinessContext = businessContext;
 }
Example #13
0
 public GenericDataService(IBusinessContext businessContext)
     : base(businessContext)
 {
 }
Example #14
0
 public ModelController(IBusinessContext businessContext, ILogger <ModelController> logger)
 {
     _businessContext = businessContext;
     _logger          = logger;
 }
 public BaseDomain(IRootContext context)
 {
     Context = new BusinessContext(context);
 }
Example #16
0
 public BaseService(IBusinessContext bussinessContext, IDataContext dataContext)
 {
     this.BusinessContext = bussinessContext;
     this.DataContext     = dataContext;
 }
Example #17
0
 public ServiceBase(IBusinessContext context)
 {
     Context = context;
 }
 DoStuff(BusinessContext context)
 {
     this.context = context;
 }
Example #19
0
 protected BaseService(IBusinessContext businessContext)
 {
     BusinessContext = businessContext;
 }
Example #20
0
 public BaseService(IRootContext context)
 {
     Context = new BusinessContext(context);
 }
 public void Setup()
 {
     unitOfWork      = new FakeUnitOfWork();
     businessContext = new BusinessContext(unitOfWork);
 }
Example #22
0
 public RecibosController(IOptions <ServiceConfiguration> configuration, IBusinessContext businessContext)
 {
     Configuracion   = configuration.Value;
     BusinessContext = businessContext;
 }
Example #23
0
 public MainViewModel(IBusinessContext context)
 {
     Customers    = new ObservableCollection <Customer>();
     this.context = context;
 }
Example #24
0
 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;
 }