Creates WCF service hosts. Used by WcfListener.
コード例 #1
0
 /// <summary>
 /// Creates and initializes a service host for use with this listener
 /// </summary>
 /// <returns></returns>
 protected override ICommunicationObject CreateCommunicationObject()
 {
     return(WcfServiceHostFactory.CreateHost(Runtime, Endpoint.ContractType, CreateServiceImplementationType(), Endpoint.ConfigurationName, Endpoint.Address));
 }
コード例 #2
0
        /// <summary>
        /// Gets the type that should be hosted by the ServiceHost
        /// </summary>
        /// <returns></returns>
        protected virtual Type CreateServiceImplementationType()
        {
            Type hostType = WcfServiceHostFactory.CreateImplementationType(Endpoint.ContractType);

            return(hostType);
        }