ScriptingOptions ScriptingOptions ScriptingOptions Constructors

정의

오버로드

ScriptingOptions() ScriptingOptions() ScriptingOptions()

ScriptingOptions 클래스의 새 인스턴스를 초기화합니다. Initializes a new instance of the ScriptingOptions class.

ScriptingOptions(ScriptingOptions) ScriptingOptions(ScriptingOptions) ScriptingOptions(ScriptingOptions)

지정된 스크립팅 옵션을 기반으로 하는 ScriptingOptions 클래스의 새 인스턴스를 초기화합니다. Initializes a new instance of the ScriptingOptions class based on the specified scripting options.

ScriptingOptions(ScriptOption) ScriptingOptions(ScriptOption) ScriptingOptions(ScriptOption)

새 인스턴스를 초기화는 ScriptingOptions 클래스 기반으로 지정 된 ScriptOption 지정한 스크립트 옵션에 따라 개체를 합니다. Initializes a new instance of the ScriptingOptions class based on the specified ScriptOption object, based on the specified script option.

ScriptingOptions() ScriptingOptions() ScriptingOptions()

ScriptingOptions 클래스의 새 인스턴스를 초기화합니다. Initializes a new instance of the ScriptingOptions class.

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

예제

다음 코드 예제에서는 ScriptingOptions 클래스의 새 인스턴스를 만들고 사용 하 여 한 스크립터를 구성 합니다.The following code example creates a new instance of the ScriptingOptions class and uses it to configure a Scripter.

Visual BasicVisual Basic

Dim srv As Server  
srv = New Server  
Dim scriptingOptions As ScriptingOptions  
scriptingOptions = New ScriptingOptions  
scriptingOptions.ScriptDrops = false  
scriptingOptions.WithDependencies = true  
Dim scrp As Scripter  
scrp = New Scripter(srv)  
scrp.Options = scriptingOptions  

PowerShellPowerShell

$srv = New-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  
$scriptingOptions = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions  
$scriptingOptions.ScriptDrops = $FALSE  
$scriptingOptions.WithDependencies = $TRUE  
$scrp = New-Object Microsoft.SqlServer.Management.Smo.Scripter($srv)  
$scrp.Options = $scriptingOptions  

설명

The default constructor initializes any fields to their default values.

ScriptingOptions(ScriptingOptions) ScriptingOptions(ScriptingOptions) ScriptingOptions(ScriptingOptions)

지정된 스크립팅 옵션을 기반으로 하는 ScriptingOptions 클래스의 새 인스턴스를 초기화합니다. Initializes a new instance of the ScriptingOptions class based on the specified scripting options.

public:
 ScriptingOptions(Microsoft::SqlServer::Management::Smo::ScriptingOptions ^ so);
public ScriptingOptions (Microsoft.SqlServer.Management.Smo.ScriptingOptions so);
Public Sub New (so As ScriptingOptions)
매개 변수
so
ScriptingOptions ScriptingOptions ScriptingOptions

A ScriptingOptions 개체 스크립트 옵션을 지정 하는 값입니다. A ScriptingOptions object value that specifies the script options.

예제

다음 코드 예제에서는 ScriptingOptions 클래스의 새 인스턴스를 만들고 사용 하 여 한 스크립터를 구성 합니다.The following code example creates a new instance of the ScriptingOptions class and uses it to configure a Scripter.

Visual BasicVisual Basic

'Connect to the default, local instance of SQLServer  
Dim srv As Server  
srv = New Server("(local)")  

'Set the options of a scripter working on the local server  
Dim scrp As Scripter  
scrp = New Scripter(srv)  
scrp.Options.ScriptDrops = false  
scrp.Options.WithDependencies = true  

'Create a ScriptingOptions instance from the Scripters already-configured options.  
Dim scriptingOptions As ScriptingOptions  
scriptingOptions = New ScriptingOptions(scrp.Options)  

PowerShellPowerShell

$srv = New-Object Microsoft.SqlServer.Management.Smo.Server("(local)")  

$scrp = New-Object Microsoft.SqlServer.Management.Smo.Scripter($srv)  
$scrp.Options.ScriptDrops = $FALSE  
$scrp.Options.WithDependencies = $TRUE  

$scriptingOptions = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions($scrp.Options)  

ScriptingOptions(ScriptOption) ScriptingOptions(ScriptOption) ScriptingOptions(ScriptOption)

새 인스턴스를 초기화는 ScriptingOptions 클래스 기반으로 지정 된 ScriptOption 지정한 스크립트 옵션에 따라 개체를 합니다. Initializes a new instance of the ScriptingOptions class based on the specified ScriptOption object, based on the specified script option.

public:
 ScriptingOptions(Microsoft::SqlServer::Management::Smo::ScriptOption ^ so);
public ScriptingOptions (Microsoft.SqlServer.Management.Smo.ScriptOption so);
Public Sub New (so As ScriptOption)
매개 변수
so
ScriptOption ScriptOption ScriptOption

A ScriptOption 개체 스크립트 옵션을 지정 하는 값입니다. A ScriptOption object value that specifies the script options.

예제

다음 코드 예제에서는 ScriptingOptions 클래스의 새 인스턴스를 만듭니다.The following code example creates a new instance of the ScriptingOptions class.

Visual BasicVisual Basic

Dim scrp As New ScriptingOptions(ScriptOption.WithDependencies)  

PowerShellPowerShell

$scrp = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions([Microsoft.SqlServer.Management.Smo.ScriptOption]::WithDependencies)  

적용 대상