다음을 통해 공유


ForEachEnumeratorHost.DelayValidation Property

Gets or sets a Boolean that indicates whether ForEachEnumerator validation is delayed until the package runs.

네임스페이스: Microsoft.SqlServer.Dts.Runtime
어셈블리: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

구문

‘선언
Public Property DelayValidation As Boolean
public bool DelayValidation { get; set; }
public:
property bool DelayValidation {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_DelayValidation ()

/** @property */
public void set_DelayValidation (boolean value)
public function get DelayValidation () : boolean

public function set DelayValidation (value : boolean)

속성 값

A Boolean that indicates if validation is delayed until package runtime. The default value for this property is false.

The following code example creates a ForEachEnumeratorHost to hold a ForEachSMOEnumerator enumerator, and displays the host properties.

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)
            {
                Console.Write("Available enumerators: {0}\n", enumInfo.Name);
                if (enumInfo.Name == EnumType.SMOEnum)
                {
                    // Set the ForEachEnumeratorInfo variable
                    // to the SMo enumerator, and use it 
                    // later in the CreateNew method.
                    info = enumInfo;
                }
        }
            ForEachEnumeratorHost enumH = info.CreateNew();
            Console.WriteLine();
            Console.WriteLine("Host InnerObject: " + enumH.InnerObject.ToString());
            Console.WriteLine("CollectionEnumerator? {0}", enumH.CollectionEnumerator);
            Console.WriteLine("CreationName: {0}",  enumH.CreationName);
            Console.WriteLine("Description:  {0}", enumH.Description);
            Console.WriteLine("Value of DelayValidation: {0}", enumH.DelayValidation);
            Console.WriteLine("HostType:    {0}", enumH.HostType);
            Console.WriteLine("ID:          {0}", enumH.ID);
            Console.WriteLine("Name:        {0}", enumH.Name);
        }
    }
}
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
            For Each enumInfo In infos
                Console.Write("Available enumerators: {0}\n", enumInfo.Name)
                If enumInfo.Name = EnumType.SMOEnum Then
                    ' Set the ForEachEnumeratorInfo variable
                    ' to the SMo enumerator, and use it 
                    ' later in the CreateNew method.
                    info = enumInfo
                End If
            Next
            Dim enumH As ForEachEnumeratorHost =  info.CreateNew() 
            Console.WriteLine()
            Console.WriteLine("Host InnerObject: " + enumH.InnerObject.ToString())
            Console.WriteLine("CollectionEnumerator? {0}", enumH.CollectionEnumerator)
            Console.WriteLine("CreationName: {0}",  enumH.CreationName)
            Console.WriteLine("Description:  {0}", enumH.Description)
            Console.WriteLine("Value of DelayValidation: {0}", enumH.DelayValidation)
            Console.WriteLine("HostType:    {0}", enumH.HostType)
            Console.WriteLine("ID:          {0}", enumH.ID)
            Console.WriteLine("Name:        {0}", enumH.Name)
        End Sub
    End Class
End Namespace

Sample Output:

Available enumerators: Foreach File Enumerator

Available enumerators: Foreach Item Enumerator

Available enumerators: Foreach ADO Enumerator

Available enumerators: Foreach ADO.NET Schema Rowset Enumerator

Available enumerators: Foreach From Variable Enumerator

Available enumerators: Foreach NodeList Enumerator

Available enumerators: Foreach SMO Enumerator

Host InnerObject: Microsoft.SqlServer.Dts.Runtime.Enumerators.SMO.ForEachSMOEnumerator

CollectionEnumerator? False

CreationName: Microsoft.SqlServer.Dts.Runtime.Enumerators.SMO.ForEachSMOEnumerator, Microsoft.SqlServer.ForEachSMOEnumerator, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91

Description:

Value of DelayValidation: False

HostType: ForEachEnumerator

ID: {C91BA4D0-6AD4-4BEE-A7C4-9A737880773E}

Name: {C91BA4D0-6AD4-4BEE-A7C4-9A737880773E}

스레드 보안

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.

플랫폼

개발 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

대상 플랫폼

지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

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