Exemple #1
0
        public ServiceEndpointDescription StartHttpHost <TServiceType, TServiceInterfaceType>(string name, string description)
        {
            Platform.Log(LogLevel.Info, "Starting WCF Shred {0}...", name);

            if (_serviceEndpointDescriptions.ContainsKey(name))
            {
                throw new Exception(String.Format("The service endpoint '{0}' already exists.", name));
            }

            ServiceEndpointDescription sed =
                WcfHelper.StartHttpHost <TServiceType, TServiceInterfaceType>(name, description, SharedHttpPort, ServiceAddressBase);

            _serviceEndpointDescriptions[name] = sed;

            Platform.Log(LogLevel.Info, "WCF Shred {0} is listening at {1}.", name, sed.ServiceHost.Description.Endpoints[0].Address);

            return(sed);
        }