コード例 #1
0
 public void AddNewDataBase(IDataBaseCollection dataBases, TaskContext context)
 {
     this.Dispatcher.Invoke(() =>
     {
         var dataBaseName = RandomUtility.NextIdentifier();
         var comment      = RandomUtility.NextString();
         dataBases.AddNewDataBase(context.Authentication, dataBaseName, comment);
     });
 }
コード例 #2
0
        public DataBaseCollectionService(ICremaHost cremaHost)
            : base(cremaHost.GetService(typeof(ILogService)) as ILogService)
        {
            this.cremaHost   = cremaHost;
            this.logService  = cremaHost.GetService(typeof(ILogService)) as ILogService;
            this.dataBases   = cremaHost.GetService(typeof(IDataBaseCollection)) as IDataBaseCollection;
            this.userContext = cremaHost.GetService(typeof(IUserContext)) as IUserContext;

            this.logService.Debug($"{nameof(DataBaseCollectionService)} Constructor");
        }