The Labs \ Source Viewer \ SSCLI \ System \ LdapStyleUriParser

  1. //------------------------------------------------------------------------------
  2. // <copyright file="UriParserTemplates.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. /*++
  16. Abstract:
  17.     This file contains a set of predefined parseres that a user can derive from
  18.     See also GenericUriParser.cs file for more user choices
  19.    
  20.     Note these parsers are for user to derive from hence they are nor "simple" nor "built-in"
  21. Author:
  22.     Alexei Vopilov    Jul 26 2004
  23. Revision History:
  24. --*/
  25. //
  26. // ATTN: The below types must be compile-time registered with UriParser.CheckSetIsSimpleFlag() method
  27. // to avoid calling into the user code if there is no one.
  28. //
  29. namespace System
  30. {
  31.     //
  32.     // The HTTP Uri syntax description
  33.     // MustHaveAuthority | AllowAnInternetHost | MayHaveUserInfo | MayHavePort | MayHavePath | MayHaveQuery | MayHaveFragment |
  34.     // | PathIsRooted | ConvertPathSlashes | CompressPath | CanonicalizeAsFilePath | UnEscapeDotsAndSlashes
  35.     //
  36.     public class HttpStyleUriParser : UriParser
  37.     {
  38.         public HttpStyleUriParser() : base(UriParser.HttpUri.Flags)
  39.         {
  40.         }
  41.     }
  42.     //
  43.     // The FTP Uri syntax description
  44.     // MustHaveAuthority | AllowAnInternetHost | MayHaveUserInfo | MayHavePort | MayHavePath | MayHaveFragment | PathIsRooted
  45.     // ConvertPathSlashes | CompressPath | CanonicalizeAsFilePath
  46.     //
  47.     public class FtpStyleUriParser : UriParser
  48.     {
  49.         public FtpStyleUriParser() : base(UriParser.FtpUri.Flags)
  50.         {
  51.         }
  52.     }
  53.     //
  54.     // The FILE Uri syntax description
  55.     // MustHaveAuthority | AllowEmptyHost| AllowAnInternetHost | MayHavePath | MayHaveFragment | PathIsRooted
  56.     // | FileLikeUri | AllowDOSPath | ConvertPathSlashes | CompressPath | CanonicalizeAsFilePath | UnEscapeDotsAndSlashes
  57.     //
  58.     public class FileStyleUriParser : UriParser
  59.     {
  60.         public FileStyleUriParser() : base(UriParser.FileUri.Flags)
  61.         {
  62.         }
  63.     }
  64.     //
  65.     // The NEWS Uri syntax description
  66.     // MayHavePath | MayHaveFragment
  67.     //
  68.     public class NewsStyleUriParser : UriParser
  69.     {
  70.         public NewsStyleUriParser() : base(UriParser.NewsUri.Flags)
  71.         {
  72.         }
  73.     }
  74.     //
  75.     // The GOPHER Uri syntax description
  76.     // MustHaveAuthority | AllowAnInternetHost | MayHaveUserInfo | MayHavePort | MayHavePath | MayHaveFragment | PathIsRooted
  77.     //
  78.     public class GopherStyleUriParser : UriParser
  79.     {
  80.         public GopherStyleUriParser() : base(UriParser.GopherUri.Flags)
  81.         {
  82.         }
  83.     }
  84.     //
  85.     // The LDAP Uri syntax description
  86.     // MustHaveAuthority | AllowEmptyHost | AllowAnInternetHost | MayHaveUserInfo | MayHavePort | MayHavePath | MayHaveQuery | MayHaveFragment | PathIsRooted
  87.     //
  88.     public class LdapStyleUriParser : UriParser
  89.     {
  90.         public LdapStyleUriParser() : base(UriParser.LdapUri.Flags)
  91.         {
  92.         }
  93.     }
  94.    
  95.     public class NetPipeStyleUriParser : UriParser
  96.     {
  97.         public NetPipeStyleUriParser() : base(UriParser.NetPipeUri.Flags)
  98.         {
  99.         }
  100.     }
  101.    
  102.     public class NetTcpStyleUriParser : UriParser
  103.     {
  104.         public NetTcpStyleUriParser() : base(UriParser.NetTcpUri.Flags)
  105.         {
  106.         }
  107.     }
  108. }

Developer Fusion