private MongoDB.Bson.BsonDocument Aggrigate(MongoDB.Bson.BsonDocument _doc) { try { string destinationValue = ""; string[] sourceKeyArr = SourceKeys.Split(','); foreach (string sourceKey in sourceKeyArr) { if (_doc[sourceKey] != null) { if (this.SourceKeyTransformation.Key == sourceKey) { destinationValue += this.SourceKeyTransformation.Execute(_doc); } else { destinationValue += _doc[sourceKey] + Delimiter; } } } if (destinationValue.EndsWith(Delimiter)) { destinationValue = destinationValue.TrimEnd(Delimiter.ToCharArray()); } _doc.Add(DestinationKey, destinationValue); } catch (Exception exp) { Console.WriteLine(exp.Message); throw; } return(_doc); }
public InputSource(List <Element> elements, params Keys[] keys) { SourceElements.AddRange(elements); SourceKeys.AddRange(keys); }
public InputSource(params Keys[] keys) { SourceKeys.AddRange(keys); }
public InputSource(Element element, Keys key) { SourceElements.Add(element); SourceKeys.Add(key); }
public InputSource(Keys key) { SourceKeys.Add(key); }