HandledEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / CompMod / System / ComponentModel / HandledEventArgs.cs / 1 / HandledEventArgs.cs

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

namespace System.ComponentModel { 
    using System; 
    using System.ComponentModel;
    using System.Diagnostics; 
    using System.Security.Permissions;

    /// 
    ///     
    ///       Provides data for the 
    ///       event. 
    ///     
    /// 
    [HostProtection(SharedState = true)] 
    public class HandledEventArgs : EventArgs {

        /// 
        ///     Indicates, on return, whether or not the event was handled in the application's event handler. 
        ///     'true' means the application handled the event, 'false' means it didn't.
        ///  
        private bool handled; 

        ///  
        ///    
        ///       Initializes a new instance of the  class with
        ///       handled set to .
        ///     
        /// 
        public HandledEventArgs() : this(false) { 
        } 

        ///  
        ///    
        ///       Initializes a new instance of the  class with
        ///       handled set to the given value.
        ///     
        /// 
        public HandledEventArgs(bool defaultHandledValue) 
        : base() { 
            this.handled = defaultHandledValue;
        } 

        /// 
        ///    
        ///       Gets or sets a value 
        ///       indicating whether the event is handled.
        ///     
        ///  
        public bool Handled {
            get { 
                return this.handled;
            }
            set {
                this.handled = value; 
            }
        } 
    } 
}

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

namespace System.ComponentModel { 
    using System; 
    using System.ComponentModel;
    using System.Diagnostics; 
    using System.Security.Permissions;

    /// 
    ///     
    ///       Provides data for the 
    ///       event. 
    ///     
    /// 
    [HostProtection(SharedState = true)] 
    public class HandledEventArgs : EventArgs {

        /// 
        ///     Indicates, on return, whether or not the event was handled in the application's event handler. 
        ///     'true' means the application handled the event, 'false' means it didn't.
        ///  
        private bool handled; 

        ///  
        ///    
        ///       Initializes a new instance of the  class with
        ///       handled set to .
        ///     
        /// 
        public HandledEventArgs() : this(false) { 
        } 

        ///  
        ///    
        ///       Initializes a new instance of the  class with
        ///       handled set to the given value.
        ///     
        /// 
        public HandledEventArgs(bool defaultHandledValue) 
        : base() { 
            this.handled = defaultHandledValue;
        } 

        /// 
        ///    
        ///       Gets or sets a value 
        ///       indicating whether the event is handled.
        ///     
        ///  
        public bool Handled {
            get { 
                return this.handled;
            }
            set {
                this.handled = value; 
            }
        } 
    } 
}

// 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