示例#1
0
 private IDictionary <string, string> GetRecursiveChildMap(IDictionary <string, string> recursiveChildKeyMap)
 {
     return(recursiveChildKeyMap?
            .Select(
                kvp => new
     {
         Key = KeyFields.SingleOrDefault(x => x.Split('_')[1] == kvp.Key), DistinctChildKey = kvp.Key == kvp.Value
                               ? null
                               : DataFields.SingleOrDefault(x => x.EqualsIgnoreCase("H_" + kvp.Value))
     })
            .ToDictionary(x => x.Key, x => x.DistinctChildKey ?? x.Key, StringComparer.InvariantCultureIgnoreCase));
 }