public void AddAndGetAccount2() { IRepository <FrontiersDb> _repo = new LiteDBRepository <FrontiersDb>(_databaseSetting); var address = "xrb_39ymww61tksoddjh1e43mprw5r8uu1318it9z3agm7e6f96kg4ndqg9tuds4"; AccountConverter converter = new AccountConverter(); var accountUInt256 = converter.DecodeAccount(address); FrontiersDb frontierEntry = new FrontiersDb(); frontierEntry.Account = accountUInt256; _repo.Insert(frontierEntry); var accountFind = converter.DecodeAccount(address); var found = _repo.FindOneById(accountFind); Assert.NotNull(found); }
// TODO: remove the need for env - get it from notify event !!!!!! public ExecutionLoggerManager(Context context, eExecutedFrom executedFrom = eExecutedFrom.Run) { mContext = context; mJsonSerializer = new Newtonsoft.Json.JsonSerializer(); mJsonSerializer.NullValueHandling = NullValueHandling.Ignore; ExecutedFrom = executedFrom; if (WorkSpace.Instance != null && WorkSpace.Instance.Solution != null && WorkSpace.Instance.Solution.LoggerConfigurations.SelectedDataRepositoryMethod == ExecutionLoggerConfiguration.DataRepositoryMethod.LiteDB) { mExecutionLogger = new LiteDBRepository(); } else { mExecutionLogger = new TextFileRepository(); } executionLoggerHelper = new ExecutionLoggerHelper(); }
public RunnerManagerViewModel() { _repo = new LiteDBRepository <RunnerSessionData>(SB.dataBaseFile, "runners"); }