Language

ChannelAdapterInitAssemblyAttribute Class

Definition

Assembly-level attribute that points at an IChannelAdapter implementation annotated with a ChannelAdapterAttribute, together with the channelId it handles.

[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]
public sealed class ChannelAdapterInitAssemblyAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)>]
type ChannelAdapterInitAssemblyAttribute = class
    inherit Attribute
Public NotInheritable Class ChannelAdapterInitAssemblyAttribute
Inherits Attribute
Inheritance
ChannelAdapterInitAssemblyAttribute
Attributes

Remarks

One instance is emitted by the ChannelAdapterInitSourceGenerator for each [ChannelAdapter] declaration in an assembly. At IChannelAdapterRegistry construction these attributes are read off the loaded assemblies and their adapters registered, so adapter authors do not need to call an explicit DI registration method and the runtime never has to scan every type to find channel adapters. Follows the same discovery pattern as Microsoft.Agents.Core.Serialization.ActivityTypeInitAssemblyAttribute.

Constructors

Name Description
ChannelAdapterInitAssemblyAttribute(Type, String)

Initializes a new instance of the ChannelAdapterInitAssemblyAttribute class.

Properties

Name Description
AdapterType

The annotated adapter type.

ChannelId

The channelId the adapter handles.

Applies to