RunInstallerAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / RunInstallerAttribute.cs / 1 / RunInstallerAttribute.cs

                            //------------------------------------------------------------------------------ 
// 
//     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));
        } 
    } 
}


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK