SettingsUnitExtensionsRegisterSettingsUnitPluginTPlugin - метод

Registers a settings unit plugin and associates it with one or more settings unit descriptors.

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.0+ffad8363f63902f18b3b3f4cfa533a14b2fb19a6
C#
public static IUnityContainer RegisterSettingsUnitPlugin<TPlugin>(
	this IUnityContainer container,
	ReadOnlySpan<SettingsUnitDescriptor> unitDescriptors,
	ReadOnlySpan<SettingsUnitCategoryDescriptor> categoryDescriptors = default
)
where TPlugin : ISettingsUnitPlugin

Параметры

container  IUnityContainer
unitDescriptors  ReadOnlySpanSettingsUnitDescriptor
A collection of settings unit descriptors that should be handled by the specified plugin. Any descriptors that is not yet registered will be registered automatically, but already registered descriptors will not override their registrations.
categoryDescriptors  ReadOnlySpanSettingsUnitCategoryDescriptor  (Optional)
Optional collection of category descriptors required by the provided unit descriptors. Any descriptors that is not yet registered will be registered automatically, but already registered descriptors will not override their registrations.

Параметры типа

TPlugin

Возвращаемое значение

IUnityContainer
The container for method chaining.

Примечание об использовании

В Visual Basic и C# этот метод можно вызывать как метод экземпляра для любого объекта типа IUnityContainer. При вызове метода для экземпляра следует опускать первый параметр. Дополнительные сведения см. в разделе Методы расширения (Visual Basic) или Методы расширения (Руководство по программированию в C#).

См. также