예제 #1
0
 public bool Equals(MongoRef <T> other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(EqualityComparer <T> .Default.Equals(Reference, other.Reference));
 }
예제 #2
0
 public override void Serialize(BsonSerializationContext context, BsonSerializationArgs args, MongoRef <T> value)
 {
     context.Writer.WriteObjectId(new ObjectId(value.ReferenceId));
 }