DeploymentBaseOptions 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供部署內容的基底選項組。
public ref class DeploymentBaseOptions : System::Runtime::Serialization::ISerializable
[System.Serializable]
public class DeploymentBaseOptions : System.Runtime.Serialization.ISerializable
type DeploymentBaseOptions = class
interface ISerializable
Public Class DeploymentBaseOptions
Implements ISerializable
- 繼承
-
DeploymentBaseOptions
- 屬性
- 實作
範例
下列範例會實作 類別的數個 DeploymentBaseOptions 屬性。 這個範例會同時具現化 DeploymentBaseOptions 來源和目的地物件的 ,並修改屬性值以啟用遠端同步作業。
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);
}
}
}
建構函式
| DeploymentBaseOptions() |
建立 DeploymentBaseOptions 物件的執行個體。 |
| DeploymentBaseOptions(SerializationInfo, StreamingContext) |
提供部署內容的基底選項組。 |
屬性
| AuthenticationType |
取得或設定字串,決定部署作業中要使用的驗證類型。 |
| ComputerName |
取得或設定電腦的名稱。 |
| DefaultProviderSettings |
提供部署內容的基底選項組。 |
| EncryptPassword |
取得或設定加密的密碼。 |
| IncludeAcls |
取得或設定值,這個值表示是否要將安全性描述項加入至部署內容。 |
| LinkExtensions |
取得物件的可列舉集合 DeploymentLinkExtension 。 |
| Password |
取得或設定用來存取部署位置的密碼。 |
| PrefetchPayload |
取得或設定值,這個值表示部署要求是否包含預先擷取承載。 |
| RetryAttempts |
取得或設定嘗試部署作業的次數。 |
| RetryInterval |
取得或設定在重試嘗試之間等候的間隔,以毫秒為單位。 |
| SkipDirectives |
取得 DeploymentSkipDirective 物件的集合。 |
| TempAgent |
提供部署內容的基底選項組。 |
| TraceLevel |
取得或設定部署基底選項的追蹤層級。 |
| UserName |
取得或設定用來存取部署位置的使用者名稱。 |
| WebServerConfiguration |
提供部署內容的基底選項組。 |
方法
| AddDefaultProviderSetting(String, String, Object) |
提供部署內容的基底選項組。 |
| GetObjectData(SerializationInfo, StreamingContext) |
還原序列化目前類別的實例。 |
事件
| Trace |
事件,指出何時發生部署追蹤事件。 |