Click or drag to resize

CobraServicesVerifyIntegrity Method (VerifyIntegrityServiceArguments)

Verify the integrity of Cobra.

Namespace:  Cobra.WebService.ClientAPI.Client
Assembly:  Cobra.WebService.ClientAPI (in Cobra.WebService.ClientAPI.dll) Version: 8.4.717.3176 (8.4.0717.3176)
Syntax
C#
public VerifyIntegrityResult VerifyIntegrity(
	VerifyIntegrityServiceArguments verifyIntegrityServiceArguments
)

Parameters

verifyIntegrityServiceArguments
Type: Cobra.Model.WebServiceVerifyIntegrityServiceArguments
An instance of VerifyIntegrityServiceArguments class.

Return Value

Type: VerifyIntegrityResult
Instance of VerifyIntegrityResult class containing the result of verifying integrity.
Examples
This example shows how to verify integrity.
C#
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();
See Also