IDTSPropertiesProvider.Properties Properti

Definisi

Mendapatkan koleksi yang berisi DtsProperty objek yang memiliki properti dan metode untuk digunakan dengan kontainer.

public:
 property Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ Properties { Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.DtsProperties Properties { get; }
member this.Properties : Microsoft.SqlServer.Dts.Runtime.DtsProperties
Public ReadOnly Property Properties As DtsProperties

Nilai Properti

Koleksi DtsProperties yang berisi DtsProperty objek yang terkait dengan kontainer.

Contoh

Salah satu kelas yang mengimplementasikan IDTSPropertiesProvider antarmuka adalah Package kelas . Contoh kode berikut menunjukkan bagaimana Package kelas mengembalikan DtsProperties koleksi dari Properties metode . Contoh kode kemudian berulang melalui properti, menampilkan beberapa nilai.

using System;  
using System.Collections.Generic;  
using System.Text;  
using Microsoft.SqlServer.Dts.Runtime;  

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            Package p1 = new Package();  

           // Retrieve the information from the Properties collection.  
           // Each item in the collection represents a property on the  
           // object. This example reviews the properties of the   
           // Package object.  

            DtsProperties props = p1.Properties;  
            String name;  
            String path;  
            TypeCode propType;  

            foreach (DtsProperty prop in props)  
            {  
                propType = prop.Type;  
                name = prop.Name;  
                path = prop.GetPackagePath(p1);  
                Console.WriteLine("Name {0}, Type {1}, Package path{2}", name, propType, path);  
            }  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim p1 As Package =  New Package()   

           ' Retrieve the information from the Properties collection.  
           ' Each item in the collection represents a property on the  
           ' object. This example reviews the properties of the   
           ' Package object.  

            Dim props As DtsProperties =  p1.Properties   
            Dim name As String  
            Dim path As String  
            Dim propType As TypeCode  

            Dim prop As DtsProperty  
            For Each prop In props  
                propType = prop.Type  
                name = prop.Name  
                path = prop.GetPackagePath(p1)  
                Console.WriteLine("Name {0}, Type {1}, Package path{2}", name, propType, path)  
            Next  
        End Sub  
    End Class  
End Namespace  

Contoh Output:

Nama CertificateContext, Type Int64, Package path\Package.CertificateContext

Nama CertificateObject, Type Object, Package path\Package.CertificateObject

Nama CheckpointFileName, Type String, Package path\Package.CheckpointFileName

Nama CheckpointUsage, Type Object, Package path\Package.CheckpointUsage

Nama CheckSignatureOnLoad, Ketik Boolean, Jalur paket\Paket.CheckSignatureOnLoad

Konfigurasi Nama, Tipe Objek, Jalur paket\Paket.Konfigurasi

Koneksi Nama, Ketik Objek, Jalur paket\Paket.Koneksi

Name CreationDate, Type DateTime, Package path\Package.CreationDate

Nama CreationName, Type String, Package path\Package.CreationName

Nama CreatorComputerName, Type String, Package path\Package.CreatorComputerName

Nama CreatorName, Jenis String, Jalur paket\Package.CreatorName

Berlaku untuk