PageRenderTime 20ms CodeModel.GetById 18ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 1ms

/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//===================================================================================
17using System;
18
19namespace Microsoft.Practices.Composite.Modularity
20{
21    /// <summary>
22    /// Specifies that the current module has a dependency on another module. This attribute should be used on classes that implement <see cref="IModule"/>.
23    /// </summary>
24    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
25    public sealed class ModuleDependencyAttribute : Attribute
26    {
27        private readonly string _moduleName;
28
29        /// <summary>
30        /// Initializes a new instance of <see cref="ModuleDependencyAttribute"/>.
31        /// </summary>
32        /// <param name="moduleName">The name of the module that this module is dependant upon.</param>
33        public ModuleDependencyAttribute(string moduleName)
34        {
35            _moduleName = moduleName;
36        }
37
38        /// <summary>
39        /// Gets the name of the module that this module is dependant upon.
40        /// </summary>
41        /// <value>The name of the module that this module is dependant upon.</value>
42        public string ModuleName
43        {
44            get { return _moduleName; }
45        }
46    }
47}