public WCFServiceController(ServiceManager serviceManager, object singletonInstance)
        {
            if (serviceManager == null)
            {
                throw new ArgumentNullException("serviceManager");
            }

            if (singletonInstance == null)
            {
                throw new ArgumentNullException("singletonInstance");
            }

            this.ServiceManager = serviceManager;

            this.createServiceHost = delegate
            {
                return new ServiceHostEx(singletonInstance);
            };
        }
        public WCFServiceController(ServiceManager serviceManager, Type serviceType)
        {
            if (serviceManager == null)
            {
                throw new ArgumentNullException("serviceManager");
            }

            if (serviceType == null)
            {
                throw new ArgumentNullException("serviceType");
            }

            this.ServiceManager = serviceManager;

            this.createServiceHost = delegate
            {
                return new ServiceHostEx(serviceType);
            };
        }