示例#1
0
        private static void StartService <TInterface, TImplementation>() where TImplementation : TInterface, new()
        {
            var(serverAddress, netTcpPort, httpsPort, certThumbprint) = GetServerConfig();
            var maxReceivedMessageSize = long.Parse(ConfigurationManager.AppSettings["MaxReceivedMessageSize"]);

            var wcfFactory = new WcfService(urlInfix: "WCFX");

            wcfFactory.HostNetTcp <TImplementation, TInterface>(serverAddress, netTcpPort, maxReceivedMessageSize, certThumbprint);
            wcfFactory.HostWS2007FederationHttp <TImplementation, TInterface>(serverAddress, httpsPort, maxReceivedMessageSize, certThumbprint);
        }