Aracılığıyla paylaş


ForEachEnumeratorHost.Properties Özelliği

Döndürür bir DtsProperties koleksiyon içeren DtsProperty nesneler.Her DtsProperty her görev hakkında daha fazla bilgi vardır ForEachEnumeratorHost.

Ad Alanı:  Microsoft.SqlServer.Dts.Runtime
Derleme:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS içinde.dll)

Sözdizimi

'Bildirim
Public ReadOnly Property Properties As DtsProperties
    Get
'Kullanım
Dim instance As ForEachEnumeratorHost
Dim value As DtsProperties

value = instance.Properties
public DtsProperties Properties { get; }
public:
virtual property DtsProperties^ Properties {
    DtsProperties^ get () sealed;
}
abstract Properties : DtsProperties
override Properties : DtsProperties
final function get Properties () : DtsProperties

Özellik Değeri

Tür: Microsoft.SqlServer.Dts.Runtime.DtsProperties
A DtsProperties koleksiyon.

Uygulamalar

IDTSPropertiesProvider.Properties

Örnekler

Aşağıdaki kod örneği ana bir ForEachSMOEnumerator , ForEachEnumeratorHost, daha sonra özelliklerini görüntüler koleksiyon ana bilgisayar.

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

namespace Microsoft.SqlServer.SSIS.Sample
{
    internal class EnumType
    {
        public const string SMOEnum = "Foreach SMO Enumerator";
    }
        class Program
        {
            static void Main(string[] args)
            {
                Application app = new Application();

                ForEachEnumeratorInfos infos = app.ForEachEnumeratorInfos;
                ForEachEnumeratorInfo info = null;
                foreach (ForEachEnumeratorInfo enumInfo in infos)
                {
                    if (enumInfo.Name == EnumType.SMOEnum)
                        {
                            info = enumInfo;
                        }
                }
                ForEachEnumeratorHost enumH = info.CreateNew();
                DtsProperties hostProps = enumH.Properties;

                // Display the name and type of properties in the collection.
                foreach (DtsProperty prop in hostProps)
            {
                Console.WriteLine("Property Name {0}, Type {1}", prop.Name, prop.Type);
                //Console.WriteLine("Property Type {0}", prop.Type);
            }

            ForEachSMOEnumerator smoEnumerator = (ForEachSMOEnumerator)enumH.InnerObject;
        }
    }
}
Imports System
Imports System.Collections.Generic
Imports System.Text
Imports Microsoft.SqlServer.Dts.Runtime.Enumerators.SMO
Imports Microsoft.SqlServer.Dts.Runtime
 
Namespace Microsoft.SqlServer.SSIS.Sample
    Friend Class EnumType
        Public const String SMOEnum = "Foreach SMO Enumerator"
    End Class
        Class Program
            Shared  Sub Main(ByVal args() As String)
                Dim app As Application =  New Application() 
 
                Dim infos As ForEachEnumeratorInfos =  app.ForEachEnumeratorInfos 
                Dim info As ForEachEnumeratorInfo =  Nothing 
                Dim EnumInfo As ForEachEnumeratorInfo 
                Dim enumInfo As ForEachEnumeratorInfo
                End Enum
                For Each EnumInfo In infos 
                For Each EnumInfo In infos 
                For Each EnumInfo In infos If EnumInfo.Name = EnumType.SMOEnum Then info = EnumInfo End Enum End Enum 
                For Each enumInfo In infos
                    If enumInfo.Name = EnumType.SMOEnum Then
                            info = enumInfo
                End Enum
                End Enum
                End Enum
                    End If
                Next
                Dim EnumH As ForEachEnumeratorHost =  info.CreateNew() 
                Dim enumH As ForEachEnumeratorHost =  info.CreateNew() 
                End Enum
                Dim hostProps As DtsProperties =  EnumH.Properties 
                Dim hostProps As DtsProperties =  enumH.Properties 
                End Enum
 
                ' Display the name and type of properties in the collection.
                Dim prop As DtsProperty
                For Each prop In hostProps
                Console.WriteLine("Property Name {0}, Type {1}", prop.Name, prop.Type)
                'Console.WriteLine("Property Type {0}", prop.Type);
                Next
 
            Dim smoEnumerator As ForEachSMOEnumerator = CType(EnumH.InnerObject, ForEachSMOEnumerator)
            Dim smoEnumerator As ForEachSMOEnumerator = CType(enumH.InnerObject, ForEachSMOEnumerator)
            End Enum
            End Sub
        End Class
End Namespace

Örnek Çıktı:

Özellik adı CollectionEnumerator, Boole türü

Özellik adı CreationName, dize türünde

Özellik adı, açıklama, dize türünde

Özellik adı EnumURN, dize türünde

Özellik adı kimliği, dize türünde

Özellik adı, türü dize

Özellik adı sürümü, türü Int32