다음을 통해 공유


DtsProperty.Type 속성

정의

매개 변수의 데이터 형식을 반환합니다. 이 필드는 읽기 전용입니다.

public:
 property TypeCode Type { TypeCode get(); };
public TypeCode Type { get; }
member this.Type : TypeCode
Public ReadOnly Property Type As TypeCode

속성 값

매개 변수의 데이터 형식을 나타내는 TypeCode를 반환합니다.

예제

이 개체는 개체를 DtsProperties 포함하여 Package 구현되는 다양한 개체의 각 속성에 대한 정보를 포함하는 컬렉션에서 사용됩니다. 아래 예제에서는 패키지에 대한 컬렉션을 반환 DtsProperties 한 다음 패키지 속성을 반복하여 여러 값을 Type표시합니다.

// other Using statements here...  
using Microsoft.SqlServer.Dts.Runtime;  
namespace DtsPropertiesTesting  
{  
class Program  
    {  

        static void Main(string[] args)  
        {  
            // The variable pkg points to the location  
            // of the ExecuteProcess package sample   
            // that is installed with the samples.  
            string packageFile = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";  

            Application application = new Application();  
            Package package = application.LoadPackage(packageFile, null);  

            // Retrieve the information from the Properties collection.  
            // Each item in the collection represents a property on the  
            // Package object.  

            DtsProperties properties = package.Properties;  

            String propertyName;  
            DTSPropertyKind propertyKind;  
            String packagePath;  
            TypeCode propertyType;  

            foreach (DtsProperty property in properties)  
            {  
                propertyType = property.Type;  
                propertyName = property.Name;  
                propertyKind = property.PropertyKind;  
                packagePath = property.GetPackagePath(package);  
                Console.WriteLine("Property Type: {0}, Property Name: {1}, Property Kind: {2}, Package Path: {3} ", propertyType, propertyName, propertyKind, packagePath);  
            }  
        }  
    }  
}  
' other Using statements here...  
Imports Microsoft.SqlServer.Dts.Runtime  
Namespace DtsPropertiesTesting  
Class Program  

        Shared  Sub Main(ByVal args() As String)  
            ' The variable pkg points to the location  
            ' of the ExecuteProcess package sample   
            ' that is installed with the samples.  
            Dim packageFile As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"   

            Dim application As Application =  New Application()   
            Dim package As Package =  application.LoadPackage(packageFile,Nothing)   

            ' Retrieve the information from the Properties collection.  
            ' Each item in the collection represents a property on the  
            ' Package object.  

            Dim properties As DtsProperties =  package.Properties   

            Dim propertyName As String  
            Dim propertyKind As DTSPropertyKind  
            Dim packagePath As String  
            Dim propertyType As TypeCode  

            Dim property As DtsProperty  
            For Each property In properties  
                propertyType = property.Type  
                propertyName = property.Name  
                propertyKind = property.PropertyKind  
                packagePath = property.GetPackagePath(package)  
                Console.WriteLine("Property Type: {0}, Property Name: {1}, Property Kind: {2}, Package Path: {3} ", propertyType, propertyName, propertyKind, packagePath)  
            Next  
        End Sub  
End Class  
End Namespace  

샘플 출력:

Property Type Int64, name CertificateContext, Property Kind Other, Package path \Package.CertificateContext

Property Type Object, name CertificateObject, Property Kind Other, Package path \Package.CertificateObject

Property Type String, name CheckpointFileName, Property Kind Other, Package path \Package.CheckpointFileName

Property Type Object, name CheckpointUsage, Property Kind Other, Package path \Package.CheckpointUsage

Property Type Boolean, name CheckSignatureOnLoad, Property Kind Other, Package path \Package.CheckSignatureOnLoad

Property Type Object, name Configurations, Property Kind Other, Package path \Package.Configurations

Property Type Object, name Connections, Property Kind Other, Package path \Package.Connections

Property Type DateTime, name CreationDate, Property Kind Other, Package path \Package.CreationDate

Property Type String, name CreationName, Property Kind Other, Package path \Package.CreationName

Property Type String, name CreatorComputerName, Property Kind Other, Package path \Package.CreatorComputerName

Property Type String, name CreatorName, Property Kind Other, Package path \Package.CreatorName

Property Type Boolean, name DelayValidation, Property Kind Other, Package path \Package.DelayValidation

Property Type String, name Description, Property Kind Other, Package path \Package.Description

Property Type Object, name DesignEvents, Property Kind Other, Package path \Package.DesignEvents

Property Type Boolean, name Disable, Property Kind Other, Package path \Package.Disable

Property Type Boolean, name DisableEventHandlers, Property Kind Other, Package path \Package.DisableEventHandlers

설명

TypeCode에 대한 자세한 내용은 .NET Framework SDK의 TypeCode 열거형을 참조하세요.

적용 대상