//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //------------------------------------------------------------------------------ /* */ namespace System.ComponentModel { using System; using System.Diagnostics; using System.Security.Permissions; /// /// /// Specifies whether an installer should be invoked during /// installation of an assembly. /// [AttributeUsage(AttributeTargets.Class)] public class RunInstallerAttribute : Attribute { private bool runInstaller; /// /// /// /// Initializes a new instance of /// the class. /// /// public RunInstallerAttribute(bool runInstaller) { this.runInstaller = runInstaller; } /// /// /// /// Gets a value indicating whether an installer should be /// invoked during installation of an assembly. /// /// public bool RunInstaller { get { return runInstaller; } } /// /// /// /// Specifies that a /// component is visible in a visual designer. This field is /// read-only. /// /// public static readonly RunInstallerAttribute Yes = new RunInstallerAttribute(true); /// /// /// /// Specifies that a /// component /// is not visible in a visual designer. This field is /// read-only. /// /// public static readonly RunInstallerAttribute No = new RunInstallerAttribute(false); /// /// /// /// Specifies the default visiblity, which is . This field is /// read-only. /// /// public static readonly RunInstallerAttribute Default = No; /// /// /// /// public override bool Equals(object obj) { if (obj == this) { return true; } RunInstallerAttribute other = obj as RunInstallerAttribute; return other != null && other.RunInstaller == runInstaller; } /// /// /// /// Returns the hashcode for this object. /// /// public override int GetHashCode() { return base.GetHashCode(); } /// /// /// /// public override bool IsDefaultAttribute() { return (this.Equals(Default)); } } }