AppContainer.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #region File Description
  2. //-----------------------------------------------------------------------------
  3. // AppContainer.cs
  4. //
  5. // Microsoft XNA Community Game Platform
  6. // Copyright (C) Microsoft Corporation. All rights reserved.
  7. //-----------------------------------------------------------------------------
  8. #endregion
  9. //-----------------------------------------------------------------------------
  10. // AppContainer.cs
  11. //
  12. // Microsoft XNA Community Game Platform
  13. // Copyright (C) Microsoft Corporation. All rights reserved.
  14. //-----------------------------------------------------------------------------
  15. #region Using Statements
  16. using System;
  17. using System.ComponentModel;
  18. using System.ComponentModel.Design;
  19. using System.Collections.Generic;
  20. using System.Text;
  21. #endregion
  22. namespace Xna.Tools
  23. {
  24. /// <summary>
  25. /// This class provide container instance that has IServiceContainer
  26. /// </summary>
  27. public class AppContainer : Container
  28. {
  29. ServiceContainer services = new ServiceContainer();
  30. protected override object GetService(Type service)
  31. {
  32. object so = services.GetService(service);
  33. if (so == null) so = base.GetService(service);
  34. return so;
  35. }
  36. }
  37. }