Class ThrottlingService
A service that maintains throttling components in an application and allows to turn on/off global throttling functionality
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Throttling
Assembly: NFX.dll
Syntax
[ConfigMacroContext]
public class ThrottlingService : Service, IService, INamed, ILocalizedTimeProvider, IThrottlingImplementation, IThrottling, IApplicationComponent, IDisposable, IConfigurable
Constructors
ThrottlingService()
Declaration
public ThrottlingService()
Fields
CONFIG_THROTTLE_SECTION
Declaration
public const string CONFIG_THROTTLE_SECTION = "throttle"
Field Value
Type | Description |
---|---|
System.String |
Properties
ComponentCommonName
Declaration
public override string ComponentCommonName { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Enabled
Declaration
public bool Enabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[String]
Resolve a throttle instance by name
Declaration
public IThrottle this[string name] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type | Description |
---|---|
IThrottle |
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
DoConfigure(IConfigSectionNode)
Declaration
protected override void DoConfigure(IConfigSectionNode node)
Parameters
Type | Name | Description |
---|---|---|
IConfigSectionNode | node |
Overrides
DoStart()
Declaration
protected override void DoStart()
Overrides
Get<T>(String)
Resolve a typed throttle by name
Declaration
public T Get<T>(string name)where T : Throttle
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
RegisterThrottle(Throttle)
Register a throttle with this throttling container
Declaration
public void RegisterThrottle(Throttle throttle)
Parameters
Type | Name | Description |
---|---|---|
Throttle | throttle |
UnregisterThrottle(Throttle)
Unregister a throttle from this throttling container
Declaration
public bool UnregisterThrottle(Throttle throttle)
Parameters
Type | Name | Description |
---|---|---|
Throttle | throttle |
Returns
Type | Description |
---|---|
System.Boolean | True if throttle was successfully unregistered |
Implements
System.IDisposable