The Labs \ Source Viewer \ SSCLI \ System.Net \ HeaderInfo

  1. //------------------------------------------------------------------------------
  2. // <copyright file="_HeaderInfo.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Net
  16. {
  17.    
  18.     internal delegate string[] HeaderParser(string value);
  19.    
  20.     internal class HeaderInfo
  21.     {
  22.        
  23.         internal readonly bool IsRequestRestricted;
  24.         internal readonly bool IsResponseRestricted;
  25.         internal readonly HeaderParser Parser;
  26.        
  27.         //
  28.         // Note that the HeaderName field is not always valid, and should not
  29.         // be used after initialization. In particular, the HeaderInfo returned
  30.         // for an unknown header will not have the correct header name.
  31.         //
  32.        
  33.         internal readonly string HeaderName;
  34.         internal readonly bool AllowMultiValues;
  35.        
  36.         internal HeaderInfo(string name, bool requestRestricted, bool responseRestricted, bool multi, HeaderParser p)
  37.         {
  38.             HeaderName = name;
  39.             IsRequestRestricted = requestRestricted;
  40.             IsResponseRestricted = responseRestricted;
  41.             Parser = p;
  42.             AllowMultiValues = multi;
  43.         }
  44.     }
  45. }
  46. // namespace System.Net

Developer Fusion