Guest User

Untitled

a guest
Dec 9th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace One_Server.Database
  7. {
  8. public class ConnectionString
  9. {
  10. #region Properties
  11. public string Server { get; set; }
  12. public int Port { get; set; }
  13. public string Schema { get; set; }
  14. public string User { get; set; }
  15. public string Password { get; set; }
  16. #endregion
  17. #region Constructors
  18. public ConnectionString() { }
  19. public ConnectionString(string server, string schema, string user, string password)
  20. {
  21. Server = server;
  22. Port = 3306;
  23. Schema = schema;
  24. User = user;
  25. Password = password;
  26. }
  27. public ConnectionString(string server, int port, string schema, string user, string password)
  28. {
  29. Server = server;
  30. Port = port;
  31. Schema = schema;
  32. User = user;
  33. Password = password;
  34. }
  35. #endregion
  36. #region Overrides
  37. public override string ToString()
  38. {
  39. return String.Format("Server={0};Port={1};Database={2};Uid={3};Pwd={4};",
  40. Server,
  41. Port,
  42. Schema,
  43. User,
  44. Password);
  45. }
  46. #endregion
  47. }
  48. }
Add Comment
Please, Sign In to add comment