NavigatorInvalidBodyAccessException.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //-----------------------------------------------------------------------------
  4. namespace System.ServiceModel.Dispatcher
  5. {
  6. using System;
  7. using System.ServiceModel.Channels;
  8. using System.Collections.Generic;
  9. using System.Collections.ObjectModel;
  10. using System.Runtime.Serialization;
  11. using System.Xml.XPath;
  12. [Serializable]
  13. public class NavigatorInvalidBodyAccessException : InvalidBodyAccessException
  14. {
  15. protected NavigatorInvalidBodyAccessException(SerializationInfo info, StreamingContext context)
  16. : base(info, context)
  17. {
  18. }
  19. public NavigatorInvalidBodyAccessException()
  20. : this(SR.GetString(SR.SeekableMessageNavBodyForbidden))
  21. {
  22. }
  23. public NavigatorInvalidBodyAccessException(string message)
  24. : this(message, null)
  25. {
  26. }
  27. public NavigatorInvalidBodyAccessException(string message, Exception innerException)
  28. : base(message, innerException)
  29. {
  30. }
  31. internal FilterInvalidBodyAccessException Process(Opcode op)
  32. {
  33. Collection<MessageFilter> list = new Collection<MessageFilter>();
  34. op.CollectXPathFilters(list);
  35. return new FilterInvalidBodyAccessException(this.Message, this.InnerException, list);
  36. }
  37. }
  38. }