コード例 #1
0
		public void NBackup_A_NBackupTest()
		{
			if (GetServerVersion() < new Version("2.5.0.0"))
			{
				Assert.Inconclusive("Not supported on this version.");
				return;
			}

			Action<int> doLevel = l =>
				{
					var nbak = new FbNBackup();

					nbak.ConnectionString = BuildServicesConnectionString();
					nbak.Level = l;
					nbak.BackupFile = ConfigurationManager.AppSettings["BackupRestoreFile"] + l.ToString();
					nbak.DirectIO = true;

					nbak.Options = FbNBackupFlags.NoDatabaseTriggers;

					nbak.ServiceOutput += ServiceOutput;

					nbak.Execute();
				};
			doLevel(0);
			doLevel(1);
		}
コード例 #2
0
ファイル: FbServicesTests.cs プロジェクト: cafee/NETProvider
		public void NBackup_A_NBackupTest()
		{
			Action<int> doLevel = l =>
				{
					var nbak = new FbNBackup();

					nbak.ConnectionString = this.BuildServicesConnectionString();
					nbak.Level = l;
					nbak.BackupFile = ConfigurationManager.AppSettings["BackupRestoreFile"] + l.ToString();
					nbak.DirectIO = true;

					nbak.Options = FbNBackupFlags.NoDatabaseTriggers;

					nbak.ServiceOutput += ServiceOutput;

					nbak.Execute();
				};
			doLevel(0);
			doLevel(1);
		}
コード例 #3
0
		void NBackupBackupRestoreTest_BackupPart()
		{
			Action<int> doLevel = l =>
			{
				var nbak = new FbNBackup();

				nbak.ConnectionString = BuildServicesConnectionString(FbServerType);
				nbak.Level = l;
				nbak.BackupFile = TestsSetup.BackupRestoreFile + l.ToString();
				nbak.DirectIO = true;
				nbak.Options = FbNBackupFlags.NoDatabaseTriggers;

				nbak.ServiceOutput += ServiceOutput;

				nbak.Execute();
			};
			doLevel(0);
			doLevel(1);
		}