Jazyk

ComponentRegistration Třída

Definice

Upozornění

Use BotComponent for new components.

ComponentRegistration je podpisová třída pro objevování assetů z komponent.

[System.Obsolete("Use `BotComponent` for new components.")]
public class ComponentRegistration
[<System.Obsolete("Use `BotComponent` for new components.")>]
type ComponentRegistration = class
Public Class ComponentRegistration
Dědičnost
ComponentRegistration
Odvozené
Atributy

Poznámky

Aby byly vaše komponenty dostupné systému, odvozujete z ComponentRegistration a implementujete vhodná rozhraní, která registrují funkčnost. Tyto komponenty jsou pak spotřebovány na vhodných místech systémy, které je potřebují. Například pro přidání deklarativních typů do systému jednoduše přidáte třídu, která implementuje IComponentDeclarativeTypes.

public class MyComponentRegistration : IComponentDeclarativeTypes
{
    public IEnumerable<DeclarativeType>()
    {  
         yield return new DeclarativeType<MyType>("Contoso.MyType");
         ...
    }
}
startup.cs:
     ComponentRegistration.Add(new DeclarativeComponentRegistration()); 
     ComponentRegistration.Add(new MyComponentRegistration());

Konstruktory

Name Description
ComponentRegistration()
Zastaralé.

ComponentRegistration je podpisová třída pro objevování assetů z komponent.

Vlastnosti

Name Description
Components
Zastaralé.

Získá seznam všech registrovaných objektů ComponentRegistration.

Metody

Name Description
Add(ComponentRegistration)
Zastaralé.

Přidejte komponentu, která implementuje registrační metody.

Platí pro