public IList <ContractDeliverableCodeMapping> GetContractDeliverableCodeMapping( IList <string> deliverableCodes, CancellationToken cancellationToken) { var uncached = deliverableCodes.Where(deliverableCode => CodeMappings.All(x => x.ExternalDeliverableCode != deliverableCode)).ToList(); if (uncached.Any()) { CodeMappings.AddRange(_referenceDataRepository.GetContractDeliverableCodeMapping(uncached, cancellationToken)); } return(CodeMappings); }
public void PopulateContractDeliverableCodeMappings(IEnumerable <FcsDeliverableCodeMapping> mappings) { foreach (var mapping in mappings) { if (CodeMappings.Any(cm => cm.FundingStreamPeriodCode.CaseInsensitiveEquals(mapping.FundingStreamPeriodCode) && cm.ExternalDeliverableCode.CaseInsensitiveEquals(mapping.ExternalDeliverableCode))) { continue; } CodeMappings.Add(mapping); } }
public IEnumerable <FcsDeliverableCodeMapping> GetContractDeliverableCodeMapping( IEnumerable <string> deliverableCodes, CancellationToken cancellationToken) { var uncached = deliverableCodes .Where(deliverableCode => CodeMappings .All(x => !x.ExternalDeliverableCode.CaseInsensitiveEquals(deliverableCode))) .ToList(); if (!uncached.Any()) { return(CodeMappings); } PopulateContractDeliverableCodeMappings(uncached, cancellationToken); return(CodeMappings); }
void AddCodeMappings(ITextEditorUIContext uiContext, AvalonEditTextOutput output) { if (output == null) return; var cm = new CodeMappings(output.DebuggerMemberMappings); uiContext.AddOutputData(CodeMappingsConstants.CodeMappingsKey, cm); }
void AddCodeMappings(ITextEditorUIContext uiContext, AvalonEditTextOutput output) { if (output == null) return; var cm = new CodeMappings(output.DebuggerMemberMappings, serializedDnModuleCreator); uiContext.AddOutputData(CodeMappingsKey, cm); }
public static bool VerifyAndGetCurrentDebuggedMethod(ITextEditorUIContext uiContext, SerializedDnToken serToken, out CodeMappings codeMappings) { codeMappings = uiContext.GetCodeMappings(); return codeMappings.TryGetMapping(serToken) != null; }