/// <summary> /// /// </summary> /// <param name="blocks"></param> /// <param name="type"></param> /// <param name="delimeter"></param> /// <returns></returns> public Dictionary <string, XmlDocument> SplitFiles(ShuffleBlocks blocks, SerializationType type, char delimeter) { log.StartSection("Start SplitFiles"); var dictionarySplitFiles = new Dictionary <string, XmlDocument>(); if (blocks.Count > 0) { foreach (var blockName in blocks.Keys) { var block = blocks[blockName]; foreach (var item in block) { //Build path to use later when writing to disk string path = blockName; path += "\\" + item.Id; // Somehow create a single entity record shuffleBlock var singleShuffleBlock = new ShuffleBlocks(); var entityCollection = new CintDynEntityCollection(); singleShuffleBlock.Add(blockName, entityCollection); entityCollection.Add(item); dictionarySplitFiles.Add(path, Serialize(singleShuffleBlock, type, delimeter)); } } } log.EndSection(); return(dictionarySplitFiles); }
private CintDynEntityCollection GetMatchingRecordsFromPreRetrieved(List <string> matchattributes, CintDynEntity cdEntity, CintDynEntityCollection cAllRecordsToMatch) { log.StartSection(MethodBase.GetCurrentMethod().Name); log.Log("Searching matches for: {0} {1}", cdEntity.Id, cdEntity); var result = new CintDynEntityCollection(); foreach (var cdRecord in cAllRecordsToMatch) { if (EntityAttributesEqual(matchattributes, cdEntity, cdRecord)) { result.Add(cdRecord); log.Log("Found match: {0} {1}", cdRecord.Id, cdRecord); } } log.Log("Returned matches: {0}", result.Count); log.EndSection(); return(result); }