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 | 基礎結構。Gets or sets the description of the DtsLocalizableAttribute. (繼承自 DtsLocalizableAttribute。) | |
DisplayName | 基礎結構。Gets or sets the display name of the DtsLocalizableAttribute. (繼承自 DtsLocalizableAttribute。) | |
ForEachEnumeratorContact | Gets or sets the contact information for the Foreach enumerator object. | |
LocalizationType | 基礎結構。Gets or sets the class that supplies values for the DtsLocalizableAttribute. (繼承自 DtsLocalizableAttribute。) | |
TypeId | (繼承自 Attribute。) | |
UITypeName | Gets or sets the user interface for the Foreach enumerator object. |
上層
方法
名稱 | 說明 | |
---|---|---|
Equals | (繼承自 Attribute。) | |
GetHashCode | (繼承自 Attribute。) | |
GetType | (繼承自 Object。) | |
IsDefaultAttribute | (繼承自 Attribute。) | |
Match | (繼承自 Attribute。) | |
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 SQL Server Data Tools (SSDT).
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.00.000.00",Culture="neutral",PublicKeyToken="")]
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
執行緒安全性
這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。