Click or drag to resize

CachingEvaluatorT Class

A wrapper for any IEvaluatorT that caches the last evaluated result. This way, if a second evaluation is requested for the same date, the value is returned without recomputing it. This class is intended to be returned by GetCachingWrapper.
Inheritance Hierarchy
SystemObject
  AGI.FoundationEvaluatorT
    AGI.Foundation.InfrastructureCachingEvaluatorT

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 19.1.398.0 (19.1.398.0)
Syntax
public sealed class CachingEvaluator<T> : Evaluator<T>, 
	ICachingEvaluator, IEvaluator, IAvailability, IThreadAware, ICloneWithContext, 
	IDisposable

Type Parameters

T
The type of the evaluator.

The CachingEvaluatorT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAvailabilityIntervals
Gets a TimeIntervalCollection over which data is available. If the availability interval is infinite, this returns Infinite.
(Inherited from EvaluatorT.)
Public propertyGroup
Gets the group that contains this evaluator.
(Inherited from EvaluatorT.)
Public propertyIsThreadSafe
Gets a value indicating if the methods on this instance are safe to call from multiple threads simultaneously.
(Overrides EvaluatorTIsThreadSafe.)
Public propertyIsTimeVarying
Gets a value indicating whether or not the value of this evaluator changes with time. If , the evaluator is assumed to return the same value for any input JulianDate.
(Overrides EvaluatorTIsTimeVarying.)
Top
Methods
  NameDescription
Public methodClearCache
Clears any values cached by this evaluator.
Public methodClone
Clones this object using the specified context.
(Overrides EvaluatorTClone(CopyContext).)
Public methodDispose
Releases any resources associated with this instance.
(Inherited from EvaluatorT.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodEvaluate(JulianDate)
Evaluates the function.
(Overrides EvaluatorTEvaluate(JulianDate).)
Public methodEvaluate(TimeInterval, Duration)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from EvaluatorT.)
Public methodEvaluate(JulianDate, JulianDate, Duration)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from EvaluatorT.)
Public methodEvaluate(TimeInterval, Duration, ITrackCalculationProgress)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from EvaluatorT.)
Public methodEvaluate(JulianDate, JulianDate, Duration, ITrackCalculationProgress)
Evaluates this evaluator at a specified fixed step over the specified interval.
(Inherited from EvaluatorT.)
Public methodGetAvailabilityIntervals
Gets the intervals over which data is available. If the availability interval is infinite, this returns Infinite.
(Overrides EvaluatorTGetAvailabilityIntervals(TimeIntervalCollection).)
Public methodGetCachingWrapper
Gets a version of this evaluator that caches the previously computed value so that if it is evaluated twice at the same date the computation is done only once.
(Overrides EvaluatorTGetCachingWrapper.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsAvailable
Returns if valid data is available for this Julian date, otherwise returns .
(Overrides EvaluatorTIsAvailable(JulianDate).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateEvaluatorReferences
Updates the evaluator references held by this object using the reference-to-reference mapping in the specified CopyContext.
(Overrides EvaluatorTUpdateEvaluatorReferences(CopyContext).)
Top
See Also