private static T Subscribe <T>(WcfServiceModel <T> serviceModel, Action <AdHocServiceHostAware> subscribe) where T : WcfServiceModel <T>
        {
            var adHoc = new AdHocServiceHostAware();

            subscribe(adHoc);
            return(serviceModel.AddExtensions(adHoc));
        }
 public static T OnFaulted <T>(this WcfServiceModel <T> serviceModel, Action <ServiceHost> action) where T : WcfServiceModel <T>
 {
     return(Subscribe <T>(serviceModel, adHoc => adHoc.OnFaulted(action)));
 }