Esempio n. 1
0
        /// <summary>
        /// Connects to a vault on the server in administrative mode.
        /// </summary>
        /// <param name="vaultGuid">The Guid of the vault to connect to.</param>
        /// <param name="vault">The connected vault, or null if connection failed.</param>
        /// <param name="serverApplication">The server application</param>
        /// <remarks>Exceptions during connection will be thrown.</remarks>
        public void ConnectToVaultAdministrative(
            Guid vaultGuid,
            out Vault vault,
            out MFilesServerApplication serverApplication)
        {
            vault = null;

            // Attempt to connect to the vault using the extension method.
            serverApplication = new MFilesServerApplication();
            if (serverApplication.Connect(this) == MFServerConnection.MFServerConnectionAuthenticated)
            {
                // Attempt to log into the vault.
                vault = serverApplication.LogInToVaultAdministrative(vaultGuid.ToString("B"));
            }
        }