Ejemplo n.º 1
0
 public void InitTest()
 {
     _firstContext = new FakeContext();
     _secondContext = new FakeContext();
     _firstDb = new DbInteropService(_firstContext);
     _secondDb = new DbInteropService(_secondContext);
     _firstImport = new DbImportService(_firstContext);
     _secondImport = new DbImportService(_secondContext);
     _firstSettings = new SettingsService(_firstDb);
     _secondSettings = new SettingsService(_secondDb);
 }
 public SettingsMainViewModel(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
     var cred = _dbInterop.GetSetting(Constants.SettingPublicGitCred);
     if (!String.IsNullOrEmpty(cred))
     {
         var split = cred.Split('@');
         PublicAccount = split[0];
         PublicRepository = split[1];
     }
     PublicFolder = _dbInterop.GetSetting(Constants.SettingPublicGitFolder);
     ApplyCommand = new DelegateCommand(() =>
     {
         _dbInterop.UpdateSetting(Constants.SettingPublicGitCred, string.Format("{0}@{1}", PublicAccount, PublicRepository));
         _dbInterop.UpdateSetting(Constants.SettingPublicGitFolder, PublicFolder);
     });
 }
Ejemplo n.º 3
0
 public ExportService(IDbInteropService dbInteropService, IMaterialManager materialManager , IDbImportService dbImportService, ISettingsService settingsService)
 {
     _dbInteropService = dbInteropService;
     _materialManager = materialManager;
     _dbImportService = dbImportService;
     _settingsService = settingsService;
     var config = new MapperConfiguration(cfg =>
     {
         cfg.CreateMap<Idea, IdeaDto>();
         cfg.CreateMap<Comment, CommentDto>();
         cfg.CreateMap<Particle, ParticleDto>();
         cfg.CreateMap<Relation, RelationDto>();
         cfg.CreateMap<Tag, TagDto>();
         cfg.CreateMap<Reference, ReferenceDto>();
         cfg.CreateMap<Setting, SettingDto>();
         cfg.CreateMap<Header, HeaderDto>();
     });
     _map = config.CreateMapper();
 }
Ejemplo n.º 4
0
 public CommentManager(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
 }
Ejemplo n.º 5
0
 public IdeaManager(IDbInteropService dbInterop, ISharedService shared)
 {
     _dbInterop = dbInterop;
     _shared = shared;
 }
Ejemplo n.º 6
0
 public RelationManager(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
 }
Ejemplo n.º 7
0
 public BlockManager(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
 }
Ejemplo n.º 8
0
 public SettingsService(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
 }
Ejemplo n.º 9
0
 public ReferenceManager(IDbInteropService dbInteropService)
 {
     _dbInteropService = dbInteropService;
 }
Ejemplo n.º 10
0
 public TagsManager(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
 }
Ejemplo n.º 11
0
 public ParticlesManager(IDbInteropService dbInterop)
 {
     _dbInterop = dbInterop;
 }