Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
2.3 KiB

  1. using System;
  2. using UDDI.Diagnostics;
  3. namespace UDDI
  4. {
  5. /// ********************************************************************
  6. /// public class Application
  7. /// --------------------------------------------------------------------
  8. /// <summary>
  9. ///
  10. /// </summary>
  11. /// ********************************************************************
  12. ///
  13. public class Application
  14. {
  15. private static Application application;
  16. private Config config;
  17. private Debug debug;
  18. /// ****************************************************************
  19. /// private Application [constructor]
  20. /// ----------------------------------------------------------------
  21. /// <summary>
  22. /// </summary>
  23. /// ****************************************************************
  24. ///
  25. private Application()
  26. {
  27. config = new Config();
  28. debug = new Debug();
  29. }
  30. /// ****************************************************************
  31. /// public Current [static]
  32. /// ----------------------------------------------------------------
  33. /// <summary>
  34. /// Returns the current Application instance.
  35. /// </summary>
  36. /// ****************************************************************
  37. ///
  38. public static Application Current
  39. {
  40. get
  41. {
  42. if( null == application )
  43. application = new Application();
  44. return application;
  45. }
  46. }
  47. /// ****************************************************************
  48. /// public Config [static]
  49. /// ----------------------------------------------------------------
  50. /// <summary>
  51. /// Returns the Config instance associated with the global
  52. /// Application instance.
  53. /// </summary>
  54. /// ****************************************************************
  55. ///
  56. public static Config Config
  57. {
  58. get { return Current.config; }
  59. }
  60. /// ****************************************************************
  61. /// public Debug [static]
  62. /// ----------------------------------------------------------------
  63. /// <summary>
  64. /// Returns the Debug instance associated with the global
  65. /// Application instance.
  66. /// </summary>
  67. /// ****************************************************************
  68. ///
  69. public static Debug Debug
  70. {
  71. get { return Current.debug; }
  72. }
  73. }
  74. }