HttpListenerElement.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Configuration / HttpListenerElement.cs / 1305376 / HttpListenerElement.cs

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

namespace System.Net.Configuration 
{ 
    using System;
    using System.Configuration; 
    using System.Reflection;
    using System.Security.Permissions;

    public sealed class HttpListenerElement : ConfigurationElement 
    {
        internal const bool UnescapeRequestUrlDefaultValue = true; 
 
        private static ConfigurationPropertyCollection properties;
        private static readonly ConfigurationProperty unescapeRequestUrl; 

        static HttpListenerElement()
        {
            unescapeRequestUrl = new ConfigurationProperty(ConfigurationStrings.UnescapeRequestUrl, typeof(bool), 
                UnescapeRequestUrlDefaultValue, ConfigurationPropertyOptions.None);
 
            properties = new ConfigurationPropertyCollection(); 
            properties.Add(unescapeRequestUrl);
        } 

        [ConfigurationProperty(ConfigurationStrings.UnescapeRequestUrl, DefaultValue = UnescapeRequestUrlDefaultValue,
            IsRequired = false)]
        public bool UnescapeRequestUrl 
        {
            get { return (bool)this[unescapeRequestUrl]; } 
        } 

        protected override ConfigurationPropertyCollection Properties 
        {
            get { return properties; }
        }
    } 
}
 

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