Class DefaultServiceBehaviorProvider
A default service behavior provider.
Inheritance
Implements
Inherited Members
Namespace: Kephas.Services.Behaviors
Assembly: Kephas.Core.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultServiceBehaviorProvider : IServiceBehaviorProvider
Constructors
| Improve this Doc View SourceDefaultServiceBehaviorProvider(ICompositionContext, ICollection<IExportFactory<IEnabledServiceBehaviorRule, ServiceBehaviorRuleMetadata>>)
Initializes a new instance of the DefaultServiceBehaviorProvider class.
Declaration
public DefaultServiceBehaviorProvider(ICompositionContext compositionContext, ICollection<IExportFactory<IEnabledServiceBehaviorRule, ServiceBehaviorRuleMetadata>> behaviorFactories = null)
Parameters
Type | Name | Description |
---|---|---|
ICompositionContext | compositionContext | The composition context. |
System.Collections.Generic.ICollection<IExportFactory<IEnabledServiceBehaviorRule, ServiceBehaviorRuleMetadata>> | behaviorFactories | The behavior factories. |
Methods
| Improve this Doc View SourceWhereEnabled<TService>(IEnumerable<TService>, IContext)
Filters the enabled services from the provided services collection.
Declaration
public IEnumerable<TService> WhereEnabled<TService>(IEnumerable<TService> services, IContext context = null)
where TService : class
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<TService> | services | The services. |
IContext | context | Context for the enabled check (optional). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TService> | An enumeration of enabled services. |
Type Parameters
Name | Description |
---|---|
TService | Type of the service. |
WhereEnabled<TService>(IEnumerable<IExportFactory<TService>>, IContext)
Filters the enabled services from the provided services collection.
Declaration
public IEnumerable<IExportFactory<TService>> WhereEnabled<TService>(IEnumerable<IExportFactory<TService>> serviceFactories, IContext context = null)
where TService : class
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IExportFactory<TService>> | serviceFactories | The service export factories. |
IContext | context | Context for the enabled check (optional). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IExportFactory<TService>> | An enumerator that allows foreach to be used to process where enabled in this collection. |
Type Parameters
Name | Description |
---|---|
TService | Type of the service. |
WhereEnabled<TService, TMetadata>(IEnumerable<IExportFactory<TService, TMetadata>>, IContext)
Filters the enabled services from the provided services collection.
Declaration
public IEnumerable<IExportFactory<TService, TMetadata>> WhereEnabled<TService, TMetadata>(IEnumerable<IExportFactory<TService, TMetadata>> serviceFactories, IContext context = null)
where TService : class
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<IExportFactory<TService, TMetadata>> | serviceFactories | The service export factories. |
IContext | context | Context for the enabled check (optional). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IExportFactory<TService, TMetadata>> | An enumerator that allows foreach to be used to process where enabled in this collection. |
Type Parameters
Name | Description |
---|---|
TService | Type of the service. |
TMetadata | Type of the service metadata. |