public static int GetMaxInstances(this ServiceHostBase host) { ServiceThrottlingBehavior throttle = host.GetThrottleBehavior(); if (throttle != null) { return(throttle.MaxConcurrentInstances); } return(0); }