NetStandard.2.1.Cdm.ConcreteFunctions.cs Maven / Gradle / Ivy
// This file is included to implement functions which can not currently be generated.
//
#nullable enable // Allow nullable reference types
namespace Org.Isda.Cdm.Functions
{
using System.Collections.Generic;
using System.Linq;
using Org.Isda.Cdm;
using Org.Isda.Cdm.MetaFields;
using Rosetta.Lib.Functions;
public class FpmlIrd8 : IRosettaFunction
{
static public bool Evaluate(Trade trade, IEnumerable accounts)
{
return true;
}
}
public class Sum : IRosettaFunction
{
static public double Evaluate(IEnumerable values)
{
return values.Sum();
}
static public decimal Evaluate(IEnumerable values)
{
var value = values.Aggregate((total, next) => total + next);
return value != null ? value.Value : default;
}
static public decimal Evaluate(IEnumerable? values)
{
return values == null ? default : values.Sum();
}
}
// TEMPORARY: Should be generated
public class PriceQuantityTriangulation : IRosettaFunction
{
static public bool Evaluate(IEnumerable tradeLots)
{
return true;
}
}
// TEMPORARY: Should be generated
public class FilterOpenTradeStates : IRosettaFunction
{
static public IEnumerable Evaluate(IEnumerable tradeStates)
{
// TODO Implement function
return tradeStates;
}
}
// TEMPORARY: Implement function
public class FilterPartyRole : IRosettaFunction
{
static public IEnumerable Evaluate(IEnumerable partyRoles, Enums.PartyRole partyRoleEnum)
{
return Enumerable.Empty();
}
}
// TEMPORARY: Implement function
public class Qualify_AssetClass_Equity : IRosettaFunction
{
static public bool Evaluate(Product product)
{
return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy