| | | 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 | | |
| | | 6 | | namespace CoreWCF.Channels |
| | | 7 | | { |
| | | 8 | | public abstract class ChannelManagerBase : CommunicationObject, IDefaultCommunicationTimeouts |
| | | 9 | | { |
| | 2 | 10 | | protected ChannelManagerBase() |
| | | 11 | | { |
| | 2 | 12 | | } |
| | | 13 | | |
| | | 14 | | protected abstract TimeSpan DefaultReceiveTimeout { get; } |
| | | 15 | | protected abstract TimeSpan DefaultSendTimeout { get; } |
| | | 16 | | |
| | | 17 | | internal TimeSpan InternalReceiveTimeout |
| | | 18 | | { |
| | 0 | 19 | | get { return DefaultReceiveTimeout; } |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | internal TimeSpan InternalSendTimeout |
| | | 23 | | { |
| | 0 | 24 | | get { return DefaultSendTimeout; } |
| | | 25 | | } |
| | | 26 | | |
| | | 27 | | TimeSpan IDefaultCommunicationTimeouts.CloseTimeout |
| | | 28 | | { |
| | 0 | 29 | | get { return DefaultCloseTimeout; } |
| | | 30 | | } |
| | | 31 | | |
| | | 32 | | TimeSpan IDefaultCommunicationTimeouts.OpenTimeout |
| | | 33 | | { |
| | 0 | 34 | | get { return DefaultOpenTimeout; } |
| | | 35 | | } |
| | | 36 | | |
| | | 37 | | TimeSpan IDefaultCommunicationTimeouts.ReceiveTimeout |
| | | 38 | | { |
| | 0 | 39 | | get { return DefaultReceiveTimeout; } |
| | | 40 | | } |
| | | 41 | | |
| | | 42 | | TimeSpan IDefaultCommunicationTimeouts.SendTimeout |
| | | 43 | | { |
| | 0 | 44 | | get { return DefaultSendTimeout; } |
| | | 45 | | } |
| | | 46 | | |
| | | 47 | | internal Exception CreateChannelTypeNotSupportedException(Type type) |
| | | 48 | | { |
| | 0 | 49 | | return new ArgumentException(SR.Format(SR.ChannelTypeNotSupported, type), "TChannel"); |
| | | 50 | | } |
| | | 51 | | } |
| | | 52 | | } |