DuplicateBsonMemberMapAttributeException.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.Runtime.Serialization;
  17. namespace MongoDB.Bson
  18. {
  19. /// <summary>
  20. /// Indicates that an attribute restricted to one member has been applied to multiple members.
  21. /// </summary>
  22. [Serializable]
  23. public class DuplicateBsonMemberMapAttributeException : BsonException
  24. {
  25. // constructors
  26. /// <summary>
  27. /// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
  28. /// </summary>
  29. /// <param name="message">The message.</param>
  30. public DuplicateBsonMemberMapAttributeException(string message)
  31. : base(message)
  32. {
  33. }
  34. /// <summary>
  35. /// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
  36. /// </summary>
  37. /// <param name="message">The message.</param>
  38. /// <param name="inner">The inner.</param>
  39. public DuplicateBsonMemberMapAttributeException(string message, Exception inner)
  40. : base(message, inner)
  41. {
  42. }
  43. /// <summary>
  44. /// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
  45. /// </summary>
  46. /// <param name="info">The info.</param>
  47. /// <param name="context">The context.</param>
  48. protected DuplicateBsonMemberMapAttributeException(SerializationInfo info, StreamingContext context)
  49. : base(info, context)
  50. {
  51. }
  52. }
  53. }