Package.CertificateContext Property
証明書のコンテキストを取得します。値の設定も可能です。
名前空間: Microsoft.SqlServer.Dts.Runtime
アセンブリ: Microsoft.SqlServer.ManagedDTS (microsoft.sqlserver.manageddts.dll 内)
構文
'宣言
<BrowsableAttribute(False)> _
Public Property CertificateContext As Long
[BrowsableAttribute(false)]
public long CertificateContext { get; set; }
[BrowsableAttribute(false)]
public:
property long long CertificateContext {
long long get ();
void set (long long value);
}
/** @property */
public long get_CertificateContext ()
/** @property */
public void set_CertificateContext (long value)
public function get CertificateContext () : long
public function set CertificateContext (value : long)
プロパティ値
証明書のコンテキストを表す Long を返します。
解説
値を設定するには、System.Security.Cryptography.X509Certificates アセンブリへの参照を含める必要があります。
使用例
次の例では、パッケージを読み込み、次にパッケージの証明書のコンテキストを含むいくつかのパッケージ プロパティを取得します。
Class PackageTest
{
static void Main(string[] args)
{
// The variable pkg points to the location of the
// ExecuteProcess package sample
// installed with the samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
Application app = new Application();
Package p = app.LoadPackage(pkg, null);
// Once the package is loaded, this sample can query
// on several properties
long cc = p.CertificateContext;
string cfn = p.CheckpointFileName;
DTSProtectionLevel pl = p.ProtectionLevel;
DTSPackageType dpt = p.PackageType;
Console.WriteLine("CertificateContext = " + cc);
Console.WriteLine("CheckpointFileName = " + cfn);
Console.WriteLine("ProtectionLevel = " + pl);
Console.WriteLine("PackageType = " + dpt);
}
}
Class PackageTest
{
Shared Sub Main(ByVal args() As String)
' The variable pkg points to the location of the
' ExecuteProcess package sample
' installed with the samples.
Dim pkg As String = "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"
Dim app As Application = New Application()
Dim p As Package = app.LoadPackage(pkg,Nothing)
' Once the package is loaded, this sample can query
' on several properties
Dim cc As Long = p.CertificateContext
Dim cfn As String = p.CheckpointFileName
Dim pl As DTSProtectionLevel = p.ProtectionLevel
Dim dpt As DTSPackageType = p.PackageType
Console.WriteLine("CertificateContext = " + cc)
Console.WriteLine("CheckpointFileName = " + cfn)
Console.WriteLine("ProtectionLevel = " + pl)
Console.WriteLine("PackageType = " + dpt)
End Sub
}
サンプルの出力 :
CertificateContext = 0
CheckpointFileName =
ProtectionLevel = EncryptSensitiveWithUserKey
PackageType = Default
スレッド セーフ
この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォーム
開発プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
対象プラットフォーム
サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。
参照
関連項目
Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace