WebHeaderCollection.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //Copyright 2010 Microsoft Corporation
  2. //
  3. //Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
  4. //You may obtain a copy of the License at
  5. //
  6. //http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. //Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
  9. //"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. //See the License for the specific language governing permissions and limitations under the License.
  11. namespace System.Data.Services.Http
  12. {
  13. using System;
  14. using System.Collections.Generic;
  15. using System.Diagnostics;
  16. internal abstract class WebHeaderCollection
  17. {
  18. #region Properties.
  19. public abstract int Count
  20. {
  21. get;
  22. }
  23. public abstract ICollection<string> AllKeys
  24. {
  25. get;
  26. }
  27. public abstract string this[string name]
  28. {
  29. get;
  30. set;
  31. }
  32. public abstract string this[System.Data.Services.Http.HttpRequestHeader header]
  33. {
  34. get;
  35. set;
  36. }
  37. #endregion Properties.
  38. public virtual void Set(HttpRequestHeader header, string value)
  39. {
  40. this[header] = value;
  41. }
  42. }
  43. }