/* Copyright 2010-present MongoDB Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MongoDB.Driver { /// /// Evidence used as proof of a MongoIdentity. /// public abstract class MongoIdentityEvidence { // constructors /// /// Initializes a new instance of the class. /// internal MongoIdentityEvidence() { } // public operators /// /// Compares two MongoIdentityEvidences. /// /// The first MongoIdentityEvidence. /// The other MongoIdentityEvidence. /// True if the two MongoIdentityEvidences are equal (or both null). public static bool operator ==(MongoIdentityEvidence lhs, MongoIdentityEvidence rhs) { return object.Equals(lhs, rhs); } /// /// Compares two MongoIdentityEvidences. /// /// The first MongoIdentityEvidence. /// The other MongoIdentityEvidence. /// True if the two MongoIdentityEvidences are not equal (or one is null and the other is not). public static bool operator !=(MongoIdentityEvidence lhs, MongoIdentityEvidence rhs) { return !(lhs == rhs); } // public methods /// /// Determines whether the specified is equal to this instance. /// /// The to compare with this instance. /// /// true if the specified is equal to this instance; otherwise, false. /// public abstract override bool Equals(object obj); /// /// Returns a hash code for this instance. /// /// /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// public abstract override int GetHashCode(); } }