HttpMessageSettings.cs 924 B

1234567891011121314151617181920212223242526272829
  1. // <copyright>
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. // </copyright>
  4. namespace System.ServiceModel.Channels
  5. {
  6. using System.Net.Http;
  7. /// <summary>
  8. /// A binding parameter that can be used with the HTTP Transport to
  9. /// specify the setting for HttpMessage support.
  10. /// </summary>
  11. public sealed class HttpMessageSettings : IEquatable<HttpMessageSettings>
  12. {
  13. /// <summary>
  14. /// Gets or sets a value indicating whether the HTTP transport should
  15. /// support <see cref="HttpRequestMessage"/> and <see cref="HttpResponseMessage"/>
  16. /// instances.
  17. /// </summary>
  18. public bool HttpMessagesSupported { get; set; }
  19. public bool Equals(HttpMessageSettings other)
  20. {
  21. return other == null ?
  22. false :
  23. other.HttpMessagesSupported == this.HttpMessagesSupported;
  24. }
  25. }
  26. }