Класс DtsForEachEnumeratorAttribute

Supplies design-time information about a ForEachEnumerator object. This class cannot be inherited.

Иерархия наследования

System. . :: . .Object
  System. . :: . .Attribute
    Microsoft.SqlServer.Dts.Runtime.Localization. . :: . .DtsLocalizableAttribute
      Microsoft.SqlServer.Dts.Runtime..::..DtsForEachEnumeratorAttribute

Пространство имен:  Microsoft.SqlServer.Dts.Runtime
Сборка:  Microsoft.SqlServer.ManagedDTS (в Microsoft.SqlServer.ManagedDTS.dll)

Синтаксис

'Декларация
<AttributeUsageAttribute(AttributeTargets.Class, Inherited := False, AllowMultiple := False)> _
Public NotInheritable Class DtsForEachEnumeratorAttribute _
    Inherits DtsLocalizableAttribute
'Применение
Dim instance As DtsForEachEnumeratorAttribute
[AttributeUsageAttribute(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class DtsForEachEnumeratorAttribute : DtsLocalizableAttribute
[AttributeUsageAttribute(AttributeTargets::Class, Inherited = false, AllowMultiple = false)]
public ref class DtsForEachEnumeratorAttribute sealed : public DtsLocalizableAttribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Class, Inherited = false, AllowMultiple = false)>]
type DtsForEachEnumeratorAttribute =  
    class
        inherit DtsLocalizableAttribute
    end
public final class DtsForEachEnumeratorAttribute extends DtsLocalizableAttribute

Тип DtsForEachEnumeratorAttribute обеспечивает доступ к следующим элементам.

Конструкторы

  Имя Описание
Открытый метод DtsForEachEnumeratorAttribute Initializes a new instance of the DtsForEachEnumeratorAttribute.

В начало

Свойства

  Имя Описание
Открытое свойство Description Инфраструктура. (Производный от DtsLocalizableAttribute.)
Открытое свойство DisplayName Инфраструктура. (Производный от DtsLocalizableAttribute.)
Открытое свойство ForEachEnumeratorContact Gets or sets the contact information for the Foreach enumerator object.
Открытое свойство LocalizationType Инфраструктура. (Производный от DtsLocalizableAttribute.)
Открытое свойство TypeId (Производный от Attribute.)
Открытое свойство UITypeName Gets or sets the user interface for the Foreach enumerator object.

В начало

Методы

  Имя Описание
Открытый метод Equals (Производный от Attribute.)
Защищенный метод Finalize (Производный от Object.)
Открытый метод GetHashCode (Производный от Attribute.)
Открытый метод GetType (Производный от Object.)
Открытый метод IsDefaultAttribute (Производный от Attribute.)
Открытый метод Match (Производный от Attribute.)
Защищенный метод MemberwiseClone (Производный от Object.)
Открытый метод ToString (Производный от Object.)

В начало

Явные реализации интерфейса

  Имя Описание
Явная реализация интерфейсаЗакрытый метод _Attribute. . :: . .GetIDsOfNames (Производный от Attribute.)
Явная реализация интерфейсаЗакрытый метод _Attribute. . :: . .GetTypeInfo (Производный от Attribute.)
Явная реализация интерфейсаЗакрытый метод _Attribute. . :: . .GetTypeInfoCount (Производный от Attribute.)
Явная реализация интерфейсаЗакрытый метод _Attribute. . :: . .Invoke (Производный от Attribute.)

В начало

Замечания

This attribute is applied to all managed Foreach enumerator classes and identifies the class as a managed Foreach enumerator to the SQL Server (SSIS) run-time engine. This attribute provides information through its properties to control how the designer displays and interacts with the object. Because all managed enumerators derive from the ForEachEnumerator base class, the first step when creating a custom enumerator is to create a class library project and inherit from the base class. Next, apply the DtsForEachEnumeratorAttribute to the class. This attribute provides the name, description, and user interface design-time information to the designer. The UITypeName property identifies the Type that implements the user interface for the enumerator that is displayed in the ForEachLoop editor. The DisplayName property is displayed in the Toolbox in the SQL Server Business Intelligence Development Studio.

For more information about applying attributes to a class, see "Applying Attributes" in the .NET Framework Developer's Guide.

The attribute is formatted as a comma-delimited string, which can contain the following elements from the Attributes class, in addition to the other attributes declared on the DtsForEachEnumeratorAttribute, such as the UITypeName and the ForEachEnumeratorContact:

  • Type name

  • Assembly name

  • File version

  • Culture

  • Public key token

The following string gives an example of how the string is formatted.

[DtsForEachEnumerator(DisplayName="MyEnumerator",UITypeName="MyNamespace.MyEnumeratorClassName,MyAssemblyName,Version=1.0.0.0,Culture=neutral,PublicKeyToken=<value>")]

You can find the values of the Culture and PublicKeyToken parameters in your assembly by examining the properties of the assembly in the global assembly cache (GAC).

Примеры

The following code sample shows the attribute applied to a new class, with several properties defined, including the DisplayName, Description, ForEachEnumeratorContact, and UITypeName.

using System;
using Microsoft.SqlServer.Dts.Runtime;

namespace Microsoft.Samples.SqlServer.Dts
{
// This attribute marks the class as a managed ForEachEnumerator.
    [DtsForEachEnumerator(DisplayName = "MyEnumerator",
      Description="A managed enumerator",
      UITypeName="<FullyQualifiedTypeName>",
      ForEachEnumeratorContact="Name of company to contact")]
    public class MyEnumerator : ForEachEnumerator
    {
        // Insert your enumerator code here.
    }
}
Imports System
Imports Microsoft.SqlServer.Dts.Runtime

Namespace Microsoft.Samples.SqlServer.Dts
  ' This attribute marks the class as a managed ForEachEnumerator.
  <DtsForEachEnumerator(DisplayName:="MyEnumerator", _
    Description:="A managed enumerator", _
    UITypeName:="<FullyQualifiedTypeName>", _
    ForEachEnumeratorContact:="Name of company to contact")> _
  Public Class MyEnumerator
    Inherits ForEachEnumerator
    ' Insert your enumerator code here.
  End Class
End Namespace

Безопасность многопоточности

Любые открытые статический (Shared в Visual Basic) элементы этого типа потокобезопасны. Потокобезопасность с элементами экземпляров не гарантируется.