DataBindingHandlerAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / DataBindingHandlerAttribute.cs / 1305376 / DataBindingHandlerAttribute.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Web.UI { 
 
    using System;
    using System.ComponentModel; 
    using System.Globalization;
    using System.Security.Permissions;

 
    /// 
    ///  
    [AttributeUsage(AttributeTargets.Class)] 
    public sealed class DataBindingHandlerAttribute : Attribute {
        private string _typeName; 


        /// 
        ///  
        public static readonly DataBindingHandlerAttribute Default = new DataBindingHandlerAttribute();
 
 
        /// 
        ///  
        public DataBindingHandlerAttribute() {
            _typeName = String.Empty;
        }
 

        ///  
        ///  
        public DataBindingHandlerAttribute(Type type) {
            _typeName = type.AssemblyQualifiedName; 
        }


        ///  
        /// 
        public DataBindingHandlerAttribute(string typeName) { 
            _typeName = typeName; 
        }
 

        /// 
        /// 
        public string HandlerTypeName { 
            get {
                return (_typeName != null ? _typeName : String.Empty); 
            } 
        }
 

        /// 
        public override bool Equals(object obj) {
            if (obj == this) { 
                return true;
            } 
 
            DataBindingHandlerAttribute other = obj as DataBindingHandlerAttribute;
 
            if (other != null) {
                return (String.Compare(HandlerTypeName, other.HandlerTypeName,
                                       StringComparison.Ordinal) == 0);
            } 

            return false; 
        } 

 
        /// 
        public override int GetHashCode() {
            return HandlerTypeName.GetHashCode();
        } 
    }
} 
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

namespace System.Web.UI { 
 
    using System;
    using System.ComponentModel; 
    using System.Globalization;
    using System.Security.Permissions;

 
    /// 
    ///  
    [AttributeUsage(AttributeTargets.Class)] 
    public sealed class DataBindingHandlerAttribute : Attribute {
        private string _typeName; 


        /// 
        ///  
        public static readonly DataBindingHandlerAttribute Default = new DataBindingHandlerAttribute();
 
 
        /// 
        ///  
        public DataBindingHandlerAttribute() {
            _typeName = String.Empty;
        }
 

        ///  
        ///  
        public DataBindingHandlerAttribute(Type type) {
            _typeName = type.AssemblyQualifiedName; 
        }


        ///  
        /// 
        public DataBindingHandlerAttribute(string typeName) { 
            _typeName = typeName; 
        }
 

        /// 
        /// 
        public string HandlerTypeName { 
            get {
                return (_typeName != null ? _typeName : String.Empty); 
            } 
        }
 

        /// 
        public override bool Equals(object obj) {
            if (obj == this) { 
                return true;
            } 
 
            DataBindingHandlerAttribute other = obj as DataBindingHandlerAttribute;
 
            if (other != null) {
                return (String.Compare(HandlerTypeName, other.HandlerTypeName,
                                       StringComparison.Ordinal) == 0);
            } 

            return false; 
        } 

 
        /// 
        public override int GetHashCode() {
            return HandlerTypeName.GetHashCode();
        } 
    }
} 
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
                        

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