SettingsUnitExtensionsRegisterSettingsUnitPluginTPlugin(IUnityContainer, ReadOnlySpanSettingsUnitDescriptor) - метод

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

Definition

Пространство имён: Tessa.SettingsUnits
Сборка: Tessa (в Tessa.dll) Версия: 4.2.3+85077ef6104b2e81389e52f8b825d77905da3c54
C#
public static IUnityContainer RegisterSettingsUnitPlugin<TPlugin>(
	this IUnityContainer container,
	ReadOnlySpan<SettingsUnitDescriptor> unitDescriptors
)
where TPlugin : class, 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.

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

TPlugin
The plugin type must be a concrete class and must be registered in Unity container.

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

IUnityContainer
The container for method chaining.

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

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

Заметки

The method automatically registers the plugin in the Unity-container by its name if it is not already registered there, using the default lifetime manager (ContainerControlledLifetimeManager).

См. также