| | | 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 CoreWCF.Configuration; |
| | | 6 | | |
| | | 7 | | namespace CoreWCF.Channels |
| | | 8 | | { |
| | | 9 | | internal abstract class ServiceChannelBase : CommunicationObject, IChannel, IDefaultCommunicationTimeouts |
| | | 10 | | { |
| | | 11 | | private readonly IDefaultCommunicationTimeouts _timeouts; |
| | | 12 | | |
| | 11 | 13 | | protected ServiceChannelBase(IDefaultCommunicationTimeouts timeouts) |
| | | 14 | | { |
| | 11 | 15 | | _timeouts = new ImmutableCommunicationTimeouts(timeouts); |
| | 11 | 16 | | } |
| | | 17 | | |
| | 6 | 18 | | TimeSpan IDefaultCommunicationTimeouts.CloseTimeout => DefaultCloseTimeout; |
| | | 19 | | |
| | 0 | 20 | | TimeSpan IDefaultCommunicationTimeouts.OpenTimeout => DefaultOpenTimeout; |
| | | 21 | | |
| | 6 | 22 | | TimeSpan IDefaultCommunicationTimeouts.ReceiveTimeout => DefaultReceiveTimeout; |
| | | 23 | | |
| | 0 | 24 | | TimeSpan IDefaultCommunicationTimeouts.SendTimeout => DefaultSendTimeout; |
| | | 25 | | |
| | 6 | 26 | | protected override TimeSpan DefaultCloseTimeout => _timeouts.CloseTimeout; |
| | | 27 | | |
| | 11 | 28 | | protected override TimeSpan DefaultOpenTimeout => _timeouts.OpenTimeout; |
| | | 29 | | |
| | 6 | 30 | | protected TimeSpan DefaultReceiveTimeout => _timeouts.ReceiveTimeout; |
| | | 31 | | |
| | 0 | 32 | | protected TimeSpan DefaultSendTimeout => _timeouts.SendTimeout; |
| | | 33 | | |
| | 48 | 34 | | public virtual IServiceChannelDispatcher ChannelDispatcher { get; set; } |
| | | 35 | | |
| | | 36 | | public virtual T GetProperty<T>() where T : class |
| | | 37 | | { |
| | 12 | 38 | | return null; |
| | | 39 | | } |
| | | 40 | | } |
| | | 41 | | } |