CobraServicesVerifyIntegrity Method (VerifyIntegrityServiceArguments) |
Namespace: Cobra.WebService.ClientAPI.Client
public VerifyIntegrityResult VerifyIntegrity( VerifyIntegrityServiceArguments verifyIntegrityServiceArguments )
using Cobra.WebService.ClientAPI; using Cobra.WebService.ClientAPI.Client; using Cobra.WebService.ClientAPI.Application.Files; using Cobra.Model.WebService; . . . CobraServices cobraServices = new CobraServices(); cobraServices.ServiceIdentityData.Username = "SYSADMIN"; cobraServices.ServiceIdentityData.SecurePassword = new SecurePassword(); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('P'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('A'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('S'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('S'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('W'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('O'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('R'); cobraServices.ServiceIdentityData.SecurePassword.AppendChar('D'); cobraServices.ServiceIdentityData.DataSourceKey = "COBRA"; LoginResult loginResult = cobraServices.Login(); if (!loginResult.Success) { Console.WriteLine("Login failed."); return; } Console.WriteLine("Login Success."); Console.WriteLine("Verifying integrity..."); VerifyIntegrityServiceArguments verifyIntegrityServiceArguments = _cobraServices.CreateCobraServicesServiceArguments<VerifyIntegrityServiceArguments>(); VerifyIntegrityResult verifyIntegrityServiceResult = _cobraServices.VerifyIntegrity(verifyIntegrityServiceArguments); Console.WriteLine(string.Format("Database Connection: ", verifyIntegrityServiceResult.DatabaseConnection)); Console.WriteLine(string.Format("Linked to Snapshot database: ", verifyIntegrityServiceResult.LinkedToSnapshotDb)); Console.WriteLine(string.Format("Connected to Snapshot database: ", verifyIntegrityServiceResult.DatabaseConnectionSnapshotDb)); Console.WriteLine(string.Format("Database version: ", verifyIntegrityServiceResult.DatabaseVersion)); Console.WriteLine(string.Format("Snapshot database has missing results : ", verifyIntegrityServiceResult.SnapshotDbHasMissingResults)); Console.WriteLine(string.Format("Snapshot database missing results : ", string.Join(", ", verifyIntegrityServiceResult.SnapshotDbMissingResults))); Console.WriteLine(string.Format("Snapshot database has missing required code files? : ", verifyIntegrityServiceResult.SnapshotDbHasMissingResults)); Console.WriteLine(string.Format("Snapshot database missing required code files : ", string.Join(", ", verifyIntegrityServiceResult.SnapshotDbMissingCodeFiles))); cobraServices.Logout();