Aracılığıyla paylaş


ComponentRegistration Sınıf

Tanım

Dikkat

Use BotComponent for new components.

ComponentRegistration, bileşenlerden varlıkları bulmak için kullanılan bir imza sınıfıdır.

[System.Obsolete("Use `BotComponent` for new components.")]
public class ComponentRegistration
[<System.Obsolete("Use `BotComponent` for new components.")>]
type ComponentRegistration = class
Public Class ComponentRegistration
Devralma
ComponentRegistration
Türetilmiş
Öznitelikler

Açıklamalar

Bileşenlerinizi ComponentRegistration'dan türetdiğiniz sistemde kullanılabilir hale getirmek ve işlevselliği kaydeden uygun arabirimleri uygulamak için. Bu bileşenler daha sonra ihtiyaç duyan sistemler tarafından uygun yerlerde kullanılır. Örneğin, sisteme bildirim temelli türler eklemek için IComponentDeclarativeTypes uygulayan bir sınıf eklemeniz yeterlidir.

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

Oluşturucular

ComponentRegistration()
Geçersiz.

ComponentRegistration, bileşenlerden varlıkları bulmak için kullanılan bir imza sınıfıdır.

Özellikler

Components
Geçersiz.

Kaydedilen tüm ComponentRegistration nesnelerinin listesini alır.

Yöntemler

Add(ComponentRegistration)
Geçersiz.

Kayıt yöntemlerini uygulayan bir bileşen ekleyin.

Şunlara uygulanır