PollyServiceCollectionExtensions Klass

Definition

Tillhandahåller metoder för bekvämlighetstillägg för att registrera IPolicyRegistry<TKey> och IReadOnlyPolicyRegistry<TKey> i tjänstsamlingen.

public ref class PollyServiceCollectionExtensions abstract sealed
public static class PollyServiceCollectionExtensions
type PollyServiceCollectionExtensions = class
Public Module PollyServiceCollectionExtensions
Arv
PollyServiceCollectionExtensions

Metoder

Name Description
AddPolicyRegistry(IServiceCollection, Action<IServiceProvider,IPolicyRegistry<String>>)

Registrerar en tom PolicyRegistry i tjänstsamlingen med tjänsttyperna IPolicyRegistry<TKey>, IReadOnlyPolicyRegistry<TKey>och IConcurrentPolicyRegistry<TKey> använder det angivna ombudet för att konfigurera den.

AddPolicyRegistry(IServiceCollection, IPolicyRegistry<String>)

Registrerar angivna IPolicyRegistry<TKey> i tjänstsamlingen med tjänsttyperna IPolicyRegistry<TKey>, IReadOnlyPolicyRegistry<TKey>och och IConcurrentPolicyRegistry<TKey> returnerar det angivna registret.

AddPolicyRegistry(IServiceCollection)

Registrerar en tom PolicyRegistry i tjänstsamlingen med tjänsttyperna IPolicyRegistry<TKey>, IReadOnlyPolicyRegistry<TKey>och IConcurrentPolicyRegistry<TKey> om tjänsttyperna inte redan har registrerats och returnerar det befintliga eller nyligen skapade registret.

Gäller för