Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WcfHost{T}" /> class.
 /// </summary>
 /// <param name="serviceType">The type that will be used to implement the service.</param>
 /// <param name="messageTransferType">The <see cref="MessageTransferType" /> to use for WCF communication.</param>
 /// <param name="uri">The URI at which the service will be hosted.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="serviceType" /> is null.
 /// <para>or</para>
 /// <paramref name="uri" /> is null.
 /// </exception>
 public WcfHost(Type serviceType, MessageTransferType messageTransferType, Uri uri)
     : this(serviceType, BindingFactory.CreateBinding(messageTransferType), uri)
 {
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WcfHost{T}" /> class.
 /// </summary>
 /// <param name="singletonInstance">The singleton instance of the service implementation.</param>
 /// <param name="messageTransferType">The <see cref="MessageTransferType" /> to use for WCF communication.</param>
 /// <param name="uri">The URI at which the service will be hosted.</param>
 /// <exception cref="ArgumentNullException">
 /// <paramref name="singletonInstance" /> is null.
 /// <para>or</para>
 /// <paramref name="uri" /> is null.
 /// </exception>
 public WcfHost(T singletonInstance, MessageTransferType messageTransferType, Uri uri)
     : this(singletonInstance, BindingFactory.CreateBinding(messageTransferType), uri)
 {
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WcfClient{T}" /> class with a configurable timeout.
 /// </summary>
 /// <param name="messageTransferType">The <see cref="MessageTransferType" /> to use for WCF communication.</param>
 /// <param name="endpoint">The endpoint at which the service is hosted.</param>
 /// <param name="timeout">The timeout value for service send/receive operations.</param>
 /// <exception cref="ArgumentNullException"><paramref name="endpoint" /> is null.</exception>
 public WcfClient(MessageTransferType messageTransferType, Uri endpoint, TimeSpan timeout)
     : base(BindingFactory.CreateBinding(messageTransferType, timeout), new EndpointAddress(endpoint))
 {
 }