Пример #1
0
 public IOfferInfrastructure FromFile(string path, string password)
 {
     var certOp = new CertificateFromFileOperation(path, password);
     var compositeSequence = _infrastructureSequence.NewCompositeSequence(certOp);
     certOp.Configure(new RemoteCompositeBuilder(compositeSequence, _webDeploy));
     return _infrastructureBuilder;
 }
 /// <summary>
 /// Will deploy certificate from local file path given correct password for private key, and deploy to certificate store on remote server.
 /// </summary>
 /// <param name="path"></param>
 /// <param name="password"></param>
 /// <returns></returns>
 public static IOfferRemoteConfiguration FromFile(this IOfferSslInfrastructure sslInfra, string path, string password)
 {
     var infraBuilder = ((SslInfrastructureBuilder)sslInfra).InfrastructureBuilder;
     var certOp = new CertificateFromFileOperation(path, password);
     Configure.Operation(infraBuilder, certOp);
     return infraBuilder;
 }
        public IOfferRemoteDeployment FromFile(string path, string password, Action<IOfferCertificateOptions> options)
        {
            var certOptions = new CertificateOptions();
            options(certOptions);

            var certOp = new CertificateFromFileOperation(path, password, certOptions);
            var compositeSequence = _remoteSequence.NewCompositeSequence(certOp);
            certOp.Configure(new RemoteCompositeBuilder(compositeSequence, _webDeploy));
            return _remoteDeploymentBuilder;
        }
        /// <summary>
        /// Will deploy certificate from local file path given correct password for private key, and deploy to certificate store on remote server with provided options.
        /// </summary>
        /// <param name="path"></param>
        /// <param name="password"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IOfferRemoteDeployment FromFile(this IOfferRemoteCertDeployment remoteCert, string path, string password, Action<IOfferCertificateOptions> options)
        {
            var certOptions = new CertificateOptions();
            if (options != null)
            {
                options(certOptions);
            }

            var remoteCertBuilder = ((RemoteCertDeploymentBuilder)remoteCert).RemoteDeployment;
            var certOp = new CertificateFromFileOperation(path, password, certOptions);
            Configure.Operation(remoteCertBuilder, certOp);
            return remoteCertBuilder;
        }