///
/// Copyright © 2003-2008 JetBrains s.r.o.
/// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder).
///
using System;
using JetBrains.Annotations;
namespace JetBrains.Omea.Base.Install
{
///
/// An attribute to mark the classes that process the installation data written in the form of assembly attributes of type during registration and unregistration.
/// Such classes will also be called once to perform their own attribute-independent installation.
/// The class must implement the interface.
///
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class InstallAttributesAttribute : Attribute
{
#region Data
private readonly Type myAttributeToInstall;
#endregion
#region Init
///
/// Creates the attribute.
/// The installer is not attached to any particular attributes, but only executes the one-time action.
///
public InstallAttributesAttribute()
: this(null)
{
}
///
/// Creates the attribute.
///
/// Type of the attribute for which the class marked by should be invoked to process the installation. May be Null if the class wants to execute its own installation only.
public InstallAttributesAttribute([CanBeNull] Type typeAttributeToInstall)
{
myAttributeToInstall = typeAttributeToInstall;
}
#endregion
#region Attributes
///
/// Gets the type of the attribute for which the class marked by should be invoked to process the installation.
///
public Type AttributeToInstall
{
get
{
return myAttributeToInstall;
}
}
#endregion
}
}