SendingRequestEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataWeb / Client / System / Data / Services / Client / SendingRequestEventArgs.cs / 1 / SendingRequestEventArgs.cs

                            //---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
// Event args for the event fired before executing a web request. Gives a
// chance to customize or replace the request object to be used. 
//  
//---------------------------------------------------------------------
 
namespace System.Data.Services.Client
{
    using System;
    using System.Net; 

    ///  
    /// Event args for the event fired before executing a web request. Gives a 
    /// chance to customize or replace the request object to be used.
    ///  
    public class SendingRequestEventArgs : EventArgs
    {
        /// The web request reported through this event
        private WebRequest request; 

        ///  
        /// Constructor 
        /// 
        /// The request reported through this event 
        internal SendingRequestEventArgs(WebRequest request)
        {
            this.request = request;
        } 

        /// The web request reported through this event. The handler may modify or replace it. 
        public WebRequest Request 
        {
            get 
            {
                return this.request;
            }
 
            set
            { 
                Util.CheckArgumentNull(value, "value"); 
                if (!(value is HttpWebRequest))
                { 
                    throw Error.Argument(Strings.Context_SendingRequestEventArgsNotHttp, "value");
                }

                this.request = value; 
            }
        } 
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//---------------------------------------------------------------------- 
// 
//      Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//  
// Event args for the event fired before executing a web request. Gives a
// chance to customize or replace the request object to be used. 
//  
//---------------------------------------------------------------------
 
namespace System.Data.Services.Client
{
    using System;
    using System.Net; 

    ///  
    /// Event args for the event fired before executing a web request. Gives a 
    /// chance to customize or replace the request object to be used.
    ///  
    public class SendingRequestEventArgs : EventArgs
    {
        /// The web request reported through this event
        private WebRequest request; 

        ///  
        /// Constructor 
        /// 
        /// The request reported through this event 
        internal SendingRequestEventArgs(WebRequest request)
        {
            this.request = request;
        } 

        /// The web request reported through this event. The handler may modify or replace it. 
        public WebRequest Request 
        {
            get 
            {
                return this.request;
            }
 
            set
            { 
                Util.CheckArgumentNull(value, "value"); 
                if (!(value is HttpWebRequest))
                { 
                    throw Error.Argument(Strings.Context_SendingRequestEventArgsNotHttp, "value");
                }

                this.request = 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