private ChannelFactory <IDataService> GetChannelFactory() { if (m_channelFactory == null) { if (string.IsNullOrEmpty(ConnectionString)) { throw new InvalidOperationException("ConnectionString is not set"); } m_connectionProps = new ConnectionProps(ConnectionString); var transport = new TcpTransportBindingElement { HostNameComparisonMode = HostNameComparisonMode.WeakWildcard, TransferMode = TransferMode.Streamed, ManualAddressing = true, MaxReceivedMessageSize = long.MaxValue }; var binding = new CustomBinding( new PqlMessageEncodingBindingElement(), transport) { OpenTimeout = TimeSpan.FromMinutes(1), CloseTimeout = TimeSpan.FromMinutes(1), ReceiveTimeout = TimeSpan.FromMinutes(60), SendTimeout = TimeSpan.FromMinutes(60) }; m_channelFactory = new ChannelFactory <IDataService>(binding); } return(m_channelFactory); }
/// <summary> /// Ctr. /// </summary> public PqlDataConnection() { m_connectionProps = new ConnectionProps(null); m_connectionState = ConnectionState.Closed; }