ICustomFunction<TParameter1,TParameter2,TResult> Interface
HAKOM.TSM.Net.Api.Calculation.Formulas.CustomFunctions
Section titled “HAKOM.TSM.Net.Api.Calculation.Formulas.CustomFunctions”Interface for custom function implementations with two parameters.
public interface ICustomFunction<TParameter1,TParameter2,TResult> : HAKOM.TSM.Net.Api.Calculation.Formulas.CustomFunctions.ICustomFunctionType parameters
Section titled “Type parameters”TParameter1
The first parameter of the custom function. Its type is TParameter1.
TParameter2
The second parameter of the custom function. Its type is TParameter2.
TResult
Type of the return value of the custom function.
Implements ICustomFunction
Methods
Section titled “Methods”ICustomFunction<TParameter1,TParameter2,TResult>.Evaluate(DateTimeOffset, TParameter1, TParameter2) Method
Section titled “ICustomFunction<TParameter1,TParameter2,TResult>.Evaluate(DateTimeOffset, TParameter1, TParameter2) Method”Evaluate is called for every time stamp of the calculation.
TResult Evaluate(System.DateTimeOffset calculationTime, TParameter1 parameter1, TParameter2 parameter2);Parameters
Section titled “Parameters”calculationTime System.DateTimeOffset
The current time stamp of System.DateTimeOffset to
parameter1 TParameter1
The first parameter of type TParameter1.
parameter2 TParameter2
The second parameter of type TParameter2.
Returns
Section titled “Returns”TResult
The result returned by the custom function.
ICustomFunction<TParameter1,TParameter2,TResult>.PerformBeforeCalculation(TParameter1, TParameter2) Method
Section titled “ICustomFunction<TParameter1,TParameter2,TResult>.PerformBeforeCalculation(TParameter1, TParameter2) Method”PerformBeforeCalculation is called once before the calculation starts to perform for each time stamp.
System.Threading.Tasks.Task PerformBeforeCalculation(TParameter1 parameter1, TParameter2 parameter2);Parameters
Section titled “Parameters”parameter1 TParameter1
The first parameter of type TParameter1.
parameter2 TParameter2
The second parameter of type TParameter2.
Returns
Section titled “Returns”System.Threading.Tasks.Task
an awaitable System.Threading.Tasks.Task.