예제 #1
0
        private static SingletonRepository CreateJsonRepositoryWithGitBackuper()
        {
            var jsonSerializerSettings = RepositorySettings.CreateDefaultJsonSettings();
            var settings = new RepositorySettings(
                directory: Directories.Default.FullName,
                jsonSerializerSettings: jsonSerializerSettings,
                isTrackingDirty: false,
                backupSettings: null);

            var gitBackuper = new GitBackuper(settings.Directory);

            return(new SingletonRepository(settings, gitBackuper));
        }
예제 #2
0
        protected override IRepository CreateRepository()
        {
            var backupSettings = new BackupSettings(
                directory: this.Directory.FullName + "\\Backup",
                extension: ".bak",
                timeStampFormat: BackupSettings.DefaultTimeStampFormat,
                numberOfBackups: 1,
                maxAgeInDays: int.MaxValue);

            var settings = new RepositorySettings(
                directory: this.Directory.FullName,
                jsonSerializerSettings: RepositorySettings.CreateDefaultJsonSettings(),
                isTrackingDirty: false,
                backupSettings: backupSettings);

            return(new SingletonRepository(settings));
        }
예제 #3
0
        public static void SetUp()
        {
            if (Directory.Exists)
            {
                DeleteRepositoryDirectory(Directory.FullName);
            }

            Directory.Create();
            var settings = new RepositorySettings(
                directory: Directory.FullName,
                jsonSerializerSettings: RepositorySettings.CreateDefaultJsonSettings(),
                isTrackingDirty: false,
                backupSettings: null);

            var gitBackuper = new GitBackuper(settings.Directory);

            repository = new SingletonRepository(settings, gitBackuper);
            dummy      = new DummySerializable(1);
        }
예제 #4
0
 private static DataRepositorySettings Create(Core.RepositorySettings settings)
 {
     return(Create(settings, RepositorySettings.CreateDefaultJsonSettings()));
 }