NetworkCredential.cs 1010 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // System.Net.NetworkCredential.cs
  3. //
  4. // Author: Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. namespace System.Net
  9. {
  10. public class NetworkCredential : ICredentials
  11. {
  12. // Fields
  13. string userName;
  14. string password;
  15. string domain;
  16. // Constructors
  17. public NetworkCredential ()
  18. : base ()
  19. {
  20. }
  21. public NetworkCredential (string userName, string password)
  22. {
  23. this.userName = userName;
  24. this.password = password;
  25. }
  26. public NetworkCredential (string userName, string password, string domain)
  27. {
  28. this.userName = userName;
  29. this.password = password;
  30. this.domain = domain;
  31. }
  32. // Properties
  33. public string Domain
  34. {
  35. get { return domain; }
  36. set { domain = value; }
  37. }
  38. public string UserName
  39. {
  40. get { return userName; }
  41. set { userName = value; }
  42. }
  43. public string Password
  44. {
  45. get { return password; }
  46. set { password = value; }
  47. }
  48. public NetworkCredential GetCredential (Uri uri, string authType)
  49. {
  50. return this;
  51. }
  52. }
  53. }