private static void Apply(ServiceHost serviceHost, Action<ServiceHost> action) { if (action != null) { action(serviceHost); } } }