-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathIFeatureManagementBuilder.cs
34 lines (31 loc) · 1.44 KB
/
IFeatureManagementBuilder.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
//
using Microsoft.Extensions.DependencyInjection;
namespace Microsoft.FeatureManagement
{
/// <summary>
/// Provides a way to customize feature management functionality.
/// </summary>
public interface IFeatureManagementBuilder
{
/// <summary>
/// The application services.
/// </summary>
IServiceCollection Services { get; }
/// <summary>
/// Adds a given feature filter to the list of feature filters that will be available to enable features during runtime.
/// Possible feature filter metadata types include <see cref="IFeatureFilter"/> and <see cref="IContextualFeatureFilter{TContext}"/>
/// Only one feature filter interface can be implemented by a single type.
/// </summary>
/// <typeparam name="T">The feature filter type.</typeparam>
/// <returns>The feature management builder.</returns>
IFeatureManagementBuilder AddFeatureFilter<T>() where T : IFeatureFilterMetadata;
/// <summary>
/// Adds an <see cref="ISessionManager"/> to be used for storing feature state in a session.
/// </summary>
/// <typeparam name="T">An implementation of <see cref="ISessionManager"/></typeparam>
/// <returns>The feature management builder.</returns>
IFeatureManagementBuilder AddSessionManager<T>() where T : ISessionManager;
}
}