DuplicateBsonMemberMapAttributeException.cs 2.1 KB

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