Freigeben über


DeploymentBaseOptions Konstruktoren

Definition

Überlädt

DeploymentBaseOptions()

Erstellt eine Instanz eines DeploymentBaseOptions-Objekts.

public:
 DeploymentBaseOptions();
public DeploymentBaseOptions ();
Public Sub New ()

Beispiele

Im folgenden Beispiel werden mehrere Eigenschaften der DeploymentBaseOptions -Klasse implementiert. In diesem Beispiel wird sowohl DeploymentBaseOptions für die Quell- als auch für das Zielobjekt instanziiert und die Eigenschaftswerte geändert, um einen Remotesynchronisierungsvorgang zu aktivieren.

using System;  
using Microsoft.Web.Deployment;  

namespace MSDeploy.Web.Deployment  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            // Example to show how DeploymentBaseOptions can be used  
            string _directory = Environment.ExpandEnvironmentVariables(  
                @"%systemdrive%\inetpub\wwwroot");  
            DeploymentSyncOptions syncOptions =   
                new DeploymentSyncOptions();  
            DeploymentBaseOptions sourceBaseOptions =   
                new DeploymentBaseOptions();  
            sourceBaseOptions.ComputerName = "sourceMachineName";  
            sourceBaseOptions.IncludeAcls = true; // false by default  
            sourceBaseOptions.UserName = "username";  
            sourceBaseOptions.Password = "password";  
            DeploymentBaseOptions destinationBaseOptions =   
                new DeploymentBaseOptions();  
            destinationBaseOptions.ComputerName =   
                "destinationMachineName";  
            destinationBaseOptions.UserName = "username";  
            destinationBaseOptions.Password = "password";  
            DeploymentObject deploymentObject =   
                DeploymentManager.CreateObject("contentPath",   
                _directory, sourceBaseOptions);  
            deploymentObject.SyncTo(  
                DeploymentWellKnownProvider.ContentPath, _directory,  
                destinationBaseOptions, syncOptions);  
        }  
    }  
}  

Gilt für:

DeploymentBaseOptions(SerializationInfo, StreamingContext)

protected:
 DeploymentBaseOptions(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
protected DeploymentBaseOptions (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
new Microsoft.Web.Deployment.DeploymentBaseOptions : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> Microsoft.Web.Deployment.DeploymentBaseOptions
Protected Sub New (info As SerializationInfo, context As StreamingContext)

Parameter

Gilt für: