Show / Hide Table of Contents

Class ResourcesMonitor<TModel, TContext, TQuery>

Class to monitor a resource collection by GET queries

Inheritance
object
ResourcesMonitor<TModel, TContext, TQuery>
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: PayrollEngine.Client.Exchange
Assembly: PayrollEngine.Client.Core.dll
Syntax
public class ResourcesMonitor<TModel, TContext, TQuery> where TModel : class where TContext : IServiceContext where TQuery : Query, new()
Type Parameters
Name Description
TModel
TContext
TQuery

Constructors

ResourcesMonitor(IReadService<TModel, TContext, TQuery>, TContext, Action<ICollection<TModel>>)

Default constructor

Declaration
public ResourcesMonitor(IReadService<TModel, TContext, TQuery> service, TContext context, Action<ICollection<TModel>> changeHandler)
Parameters
Type Name Description
IReadService<TModel, TContext, TQuery> service

The query service

TContext context

The execution context

Action<ICollection<TModel>> changeHandler

The monitoring handler

Properties

ChangeHandler

The monitoring handler

Declaration
public Action<ICollection<TModel>> ChangeHandler { get; }
Property Value
Type Description
Action<ICollection<TModel>>

Context

The execution context

Declaration
public TContext Context { get; set; }
Property Value
Type Description
TContext

Interval

The query interval

Declaration
public TimeSpan Interval { get; set; }
Property Value
Type Description
TimeSpan

IsRunning

Monitoring running state

Declaration
public bool IsRunning { get; }
Property Value
Type Description
bool

MinInterval

The minimum query interval

Declaration
public static TimeSpan MinInterval { get; }
Property Value
Type Description
TimeSpan

Service

The query service

Declaration
public IReadService<TModel, TContext, TQuery> Service { get; }
Property Value
Type Description
IReadService<TModel, TContext, TQuery>

Methods

StartAsync(CancellationToken)

Start the monitoring async

Declaration
public Task StartAsync(CancellationToken token)
Parameters
Type Name Description
CancellationToken token
Returns
Type Description
Task

Extension Methods

ConsoleExtensions.WriteProperties(object, bool)
ValueTypeExtensions.GetValueType(object)
ObjectInfo.GetPropertyValue(object, string)
ObjectInfo.GetPropertyValue<T>(object, string, T)
ObjectInfo.ResolvePropertyValue(object, string)
ObjectInfo.SetPropertyValue(object, string, object)
☀
☾
Back to top Generated by DocFX