ExternalEvidence.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Copyright 2010-present MongoDB Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. using System;
  16. using System.Collections.Generic;
  17. using System.Linq;
  18. using System.Text;
  19. namespace MongoDB.Driver
  20. {
  21. /// <summary>
  22. /// Evidence of a MongoIdentity via an external mechanism. For example, on windows this may
  23. /// be the current process' user or, on linux, via kinit.
  24. /// </summary>
  25. public sealed class ExternalEvidence : MongoIdentityEvidence
  26. {
  27. /// <summary>
  28. /// Initializes a new instance of the <see cref="ExternalEvidence" /> class.
  29. /// </summary>
  30. public ExternalEvidence()
  31. { }
  32. /// <summary>
  33. /// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
  34. /// </summary>
  35. /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param>
  36. /// <returns>
  37. /// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.
  38. /// </returns>
  39. public override bool Equals(object obj)
  40. {
  41. return obj is ExternalEvidence;
  42. }
  43. /// <summary>
  44. /// Returns a hash code for this instance.
  45. /// </summary>
  46. /// <returns>
  47. /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
  48. /// </returns>
  49. public override int GetHashCode()
  50. {
  51. return 0;
  52. }
  53. }
  54. }