# Class BaseAggregatingProvider OptimaJet.Workflow.Core.Runtime.BaseAggregatingProvider Stores providers registered either globally or for specific schemes and exposes the applicable providers in registration order. Namespace: [OptimaJet.Workflow.Core.Runtime](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/) ```csharp public abstract class BaseAggregatingProvider ``` ## Type Hierarchy - BaseAggregatingProvider Current type - [AggregatingActionProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingActionProvider/) - [AggregatingDesignerAutocompleteProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingDesignerAutocompleteProvider/) - [AggregatingDesignerParameterFormatProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingDesignerParameterFormatProvider/) - [AggregatingExternalParametersProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingExternalParametersProvider/) - [AggregatingRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingRuleProvider/) ## Methods `protected IEnumerable GetOrderedProviders(string schemeCode)` Returns the global and scheme-specific providers applicable to a scheme, from the most recently registered provider to the earliest. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | The scheme code used to include providers registered specifically for that scheme. If the value is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), empty, or has no specific registrations, only global providers are returned. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | A merged sequence of applicable global and scheme-specific providers in reverse registration order. Scope does not affect priority: the last applicable provider registered is returned first. | `protected IEnumerable GetProviders(string schemeCode)` Returns the global and scheme-specific providers applicable to a scheme, from the earliest registered provider to the most recently registered. ### Parameters | Name | Type | Description | | --- | --- | --- | | `schemeCode` | `String` | The scheme code used to include providers registered specifically for that scheme. If the value is [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null), empty, or has no specific registrations, only global providers are returned. | ### Returns | Type | Description | | --- | --- | | `IEnumerable` | A merged sequence of applicable global and scheme-specific providers in registration order. Scope does not affect priority: the earliest applicable provider registered is returned first. | `public void RegisterProvider(T provider, List schemes = null)` Registers a provider for a specific set of schemes, or for all schemes when no list is supplied. ### Parameters | Name | Type | Description | | --- | --- | --- | | `provider` | `{T}` | Provider instance to register. | | `schemes` | `List` | Scheme codes where the provider should be used. If `null` or empty, the provider is registered as a global provider. | ### Remarks Each call receives one position in the registration sequence. When several scheme codes are supplied, the provider has the same position for every listed scheme. Global and scheme-specific registrations are compared using this shared sequence. `public void Clear()` Removes all providers from this aggregator. ## Remarks Global and scheme-specific providers share a single registration sequence. Neither scope has an inherent priority: a provider registered later is considered newer regardless of whether it is global or scheme-specific. When providers are requested for a scheme, all global providers and only the providers registered specifically for that scheme are selected. The selected providers are then sorted solely by registration time: [BaseAggregatingProvider.GetProviders(string)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/BaseAggregatingProvider-T/) returns the earliest registration first, while [BaseAggregatingProvider.GetOrderedProviders(string)](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/BaseAggregatingProvider-T/) returns the most recent registration first. Derived aggregators decide whether to use the first applicable provider or combine results from all of them. This class only determines which providers are applicable and their enumeration order. [Previous AggregatingRuleProvider](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/AggregatingRuleProvider/) [Next BeforeActivityExecutionEventArgs](https://api.workflowengine.io/core/OptimaJet.Workflow.Core.Runtime/BeforeActivityExecutionEventArgs/)