| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System; |
| | | 5 | | using System.ComponentModel; |
| | | 6 | | using System.Configuration; |
| | | 7 | | using System.Text; |
| | | 8 | | using CoreWCF.Channels; |
| | | 9 | | |
| | | 10 | | namespace CoreWCF.Configuration |
| | | 11 | | { |
| | | 12 | | public abstract class WSHttpBindingBaseElement : StandardBindingElement |
| | | 13 | | { |
| | | 14 | | protected WSHttpBindingBaseElement(string name) |
| | 3 | 15 | | : base(name) |
| | | 16 | | { |
| | 3 | 17 | | } |
| | | 18 | | |
| | | 19 | | protected WSHttpBindingBaseElement() |
| | 0 | 20 | | : this(null) |
| | | 21 | | { |
| | 0 | 22 | | } |
| | | 23 | | |
| | | 24 | | [ConfigurationProperty(ConfigurationStrings.BypassProxyOnLocal, DefaultValue = false)] |
| | | 25 | | public bool BypassProxyOnLocal |
| | | 26 | | { |
| | 0 | 27 | | get { return (bool)base[ConfigurationStrings.BypassProxyOnLocal]; } |
| | 0 | 28 | | set { base[ConfigurationStrings.BypassProxyOnLocal] = value; } |
| | | 29 | | } |
| | | 30 | | |
| | | 31 | | [ConfigurationProperty(ConfigurationStrings.TransactionFlow, DefaultValue = false)] |
| | | 32 | | public bool TransactionFlow |
| | | 33 | | { |
| | 0 | 34 | | get { return (bool)base[ConfigurationStrings.TransactionFlow]; } |
| | 0 | 35 | | set { base[ConfigurationStrings.TransactionFlow] = value; } |
| | | 36 | | } |
| | | 37 | | |
| | | 38 | | [ConfigurationProperty(ConfigurationStrings.HostNameComparisonMode, DefaultValue = HostNameComparisonMode.Strong |
| | | 39 | | |
| | | 40 | | public HostNameComparisonMode HostNameComparisonMode |
| | | 41 | | { |
| | 0 | 42 | | get { return (HostNameComparisonMode)base[ConfigurationStrings.HostNameComparisonMode]; } |
| | 0 | 43 | | set { base[ConfigurationStrings.HostNameComparisonMode] = value; } |
| | | 44 | | } |
| | | 45 | | |
| | | 46 | | [ConfigurationProperty(ConfigurationStrings.MaxBufferPoolSize, DefaultValue = 65536L)] |
| | | 47 | | public long MaxBufferPoolSize |
| | | 48 | | { |
| | 3 | 49 | | get { return (long)base[ConfigurationStrings.MaxBufferPoolSize]; } |
| | 0 | 50 | | set { base[ConfigurationStrings.MaxBufferPoolSize] = value; } |
| | | 51 | | } |
| | | 52 | | |
| | | 53 | | [ConfigurationProperty(ConfigurationStrings.MaxReceivedMessageSize, DefaultValue = 65536L)] |
| | | 54 | | [LongValidator(MinValue = 1)] |
| | | 55 | | public long MaxReceivedMessageSize |
| | | 56 | | { |
| | 3 | 57 | | get { return (long)base[ConfigurationStrings.MaxReceivedMessageSize]; } |
| | 0 | 58 | | set { base[ConfigurationStrings.MaxReceivedMessageSize] = value; } |
| | | 59 | | } |
| | | 60 | | |
| | | 61 | | [ConfigurationProperty(ConfigurationStrings.MessageEncoding, DefaultValue = WSMessageEncoding.Text)] |
| | | 62 | | |
| | | 63 | | public WSMessageEncoding MessageEncoding |
| | | 64 | | { |
| | 0 | 65 | | get { return (WSMessageEncoding)base[ConfigurationStrings.MessageEncoding]; } |
| | 0 | 66 | | set { base[ConfigurationStrings.MessageEncoding] = value; } |
| | | 67 | | } |
| | | 68 | | |
| | | 69 | | [ConfigurationProperty(ConfigurationStrings.ProxyAddress, DefaultValue = null)] |
| | | 70 | | public Uri ProxyAddress |
| | | 71 | | { |
| | 0 | 72 | | get { return (Uri)base[ConfigurationStrings.ProxyAddress]; } |
| | 0 | 73 | | set { base[ConfigurationStrings.ProxyAddress] = value; } |
| | | 74 | | } |
| | | 75 | | |
| | | 76 | | [ConfigurationProperty(ConfigurationStrings.ReaderQuotas)] |
| | | 77 | | public XmlDictionaryReaderQuotasElement ReaderQuotas |
| | | 78 | | { |
| | 3 | 79 | | get { return (XmlDictionaryReaderQuotasElement)base[ConfigurationStrings.ReaderQuotas]; } |
| | | 80 | | } |
| | | 81 | | |
| | | 82 | | [ConfigurationProperty(ConfigurationStrings.ReliableSession)] |
| | | 83 | | public string ReliableSession |
| | | 84 | | { |
| | 0 | 85 | | get { throw new PlatformNotSupportedException(); } |
| | | 86 | | } |
| | | 87 | | |
| | | 88 | | [ConfigurationProperty(ConfigurationStrings.TextEncoding, DefaultValue = "utf-8")] |
| | | 89 | | [TypeConverter(typeof(EncodingConverter))] |
| | | 90 | | public Encoding TextEncoding |
| | | 91 | | { |
| | 0 | 92 | | get { return (Encoding)base[ConfigurationStrings.TextEncoding]; } |
| | 0 | 93 | | set { base[ConfigurationStrings.TextEncoding] = value; } |
| | | 94 | | } |
| | | 95 | | |
| | | 96 | | [ConfigurationProperty(ConfigurationStrings.UseDefaultWebProxy, DefaultValue = true)] |
| | | 97 | | public bool UseDefaultWebProxy |
| | | 98 | | { |
| | 0 | 99 | | get { return (bool)base[ConfigurationStrings.UseDefaultWebProxy]; } |
| | 0 | 100 | | set { base[ConfigurationStrings.UseDefaultWebProxy] = value; } |
| | | 101 | | } |
| | | 102 | | } |
| | | 103 | | } |