PageRenderTime 39ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/V2.2/trunk/CAL/Desktop/Composite/Modularity/ModuleDependencyAttribute.cs

#
C# | 47 lines | 17 code | 3 blank | 27 comment | 0 complexity | a155f54fc96e94d3194ae4921403b53c MD5 | raw file
  1. //===================================================================================
  2. // Microsoft patterns & practices
  3. // Composite Application Guidance for Windows Presentation Foundation and Silverlight
  4. //===================================================================================
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  7. // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  8. // LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  9. // FITNESS FOR A PARTICULAR PURPOSE.
  10. //===================================================================================
  11. // The example companies, organizations, products, domain names,
  12. // e-mail addresses, logos, people, places, and events depicted
  13. // herein are fictitious. No association with any real company,
  14. // organization, product, domain name, email address, logo, person,
  15. // places, or events is intended or should be inferred.
  16. //===================================================================================
  17. using System;
  18. namespace Microsoft.Practices.Composite.Modularity
  19. {
  20. /// <summary>
  21. /// Specifies that the current module has a dependency on another module. This attribute should be used on classes that implement <see cref="IModule"/>.
  22. /// </summary>
  23. [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
  24. public sealed class ModuleDependencyAttribute : Attribute
  25. {
  26. private readonly string _moduleName;
  27. /// <summary>
  28. /// Initializes a new instance of <see cref="ModuleDependencyAttribute"/>.
  29. /// </summary>
  30. /// <param name="moduleName">The name of the module that this module is dependant upon.</param>
  31. public ModuleDependencyAttribute(string moduleName)
  32. {
  33. _moduleName = moduleName;
  34. }
  35. /// <summary>
  36. /// Gets the name of the module that this module is dependant upon.
  37. /// </summary>
  38. /// <value>The name of the module that this module is dependant upon.</value>
  39. public string ModuleName
  40. {
  41. get { return _moduleName; }
  42. }
  43. }
  44. }