public IResultValues GetContractResult(ICodeIndex contract) { var resultsList = __results.Where(x => ResultListUtils.IsEqualToContractArticle(contract, x.Key)). Select(c => c.Value.Values()).ToArray(); var partyResult = resultsList.DefaultIfEmpty(ResultValues.GetEmpty()).FirstOrDefault(); return(partyResult); }
public IResultValues GetPositionResult(IBookParty position) { var resultsList = __results.Where(x => ResultListUtils.IsEqualToPositionArticle(position, x.Key)). Select(c => c.Value.Values()).ToArray(); var partyResult = resultsList.DefaultIfEmpty(ResultValues.GetEmpty()).FirstOrDefault(); return(partyResult); }
public static IResultValues BuildEmptyResult() { return(ResultValues.GetEmpty()); }