コード例 #1
0
        /// <summary>
        /// <see cref="MFilesServerApplication"/>.Connect() extension method that accepts a class type that is decorated with the MFVaultConnectionAttribute attribute.
        /// </summary>
        /// <param name="sa"><see cref="MFilesServerApplication"/> instance</param>
        /// <param name="serverInfo"><see cref="MFServerAttribute"/> server connection info.</param>
        public static void Connect(this MFilesServerApplication sa, MFServerAttribute serverInfo)
        {
            // Test the connection to the server.
            int ms = sa.TestConnectionToServer(serverInfo.NetworkAddress, serverInfo.Endpoint, serverInfo.ProtocolSequence);

            sa.Connect(
                serverInfo.AuthType,
                serverInfo.UserName,
                serverInfo.Password,
                serverInfo.Domain,
                serverInfo.ProtocolSequence,
                serverInfo.NetworkAddress,
                serverInfo.Endpoint,
                serverInfo.LocalComputerName,
                serverInfo.AllowAnonymousConnection
                );
        }