Example #1
0
 /// <summary>
 /// Lookup an existing mapping.
 /// </summary>
 /// <param name="toFind">the object identifier to find.</param>
 /// <returns>the instance mapped to toFind, or null if no mapping exists.</returns>
 public TObject Get(AnyObjectId toFind)
 {
     return(this.SingleOrDefault(x => toFind.ToObjectId() == x.ToObjectId()));
 }
 /// <summary>
 /// Lookup an existing mapping.
 /// </summary>
 /// <param name="toFind">the object identifier to find.</param>
 /// <returns>the instance mapped to toFind, or null if no mapping exists.</returns>
 public TObject Get(AnyObjectId toFind)
 {
     return(this.SingleOrDefault(x => AnyObjectId.equals(toFind.ToObjectId(), x.ToObjectId())));
 }
Example #3
0
 public static void setOldObjectId(this RefUpdate refUpdate, AnyObjectId id)
 {
     refUpdate.OldObjectId = id != null?id.ToObjectId() : null;;
 }