Package.Properties Property

Returns a collection of DtsProperties for the package.

Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly : Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Syntax

'Declaration
Public ReadOnly Property Properties As DtsProperties
public DtsProperties Properties { get; }
public:
virtual property DtsProperties^ Properties {
    DtsProperties^ get () sealed;
}
/** @property */
public final DtsProperties get_Properties ()
public final function get Properties () : DtsProperties

Eigenschaftswert

A DtsProperties collection.

Beispiel

This property returns a DtsProperties collection, which contains information about each property in the Package object. The example below returns a DtsProperties collection, and then iterates through the properties, displaying several values.

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

Sample Output:

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

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

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

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

Name CheckSignatureOnLoad, Type Boolean, Package path\Package.CheckSignatureOnLoad

Name Configurations, Type Object, Package path\Package.Configurations

Name Connections, Type Object, Package path\Package.Connections

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

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

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

Name CreatorName, Type String, Package path\Package.CreatorName

Threadsicherheit

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plattformen

Entwicklungsplattformen

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Zielplattforme

Eine Liste der unterstützten Plattformen finden Sie unterHardware- und Softwareanforderungen für die Installation von SQL Server 2005.

Siehe auch

Verweis

Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace