public static CustomService GetServiceRegistry(this HttpActionDescriptor descriptor) { var name = descriptor.ControllerDescriptor.ControllerName + "." + descriptor.ActionName; var actionRegistry = CustomServiceRegistryProvider.Registry().FirstOrDefault(r => r.Name == name); return(actionRegistry ?? descriptor.ControllerDescriptor.GetServiceRegistry()); }
public static CustomService GetServiceRegistry(this HttpControllerDescriptor descriptor) { return(CustomServiceRegistryProvider.Registry().FirstOrDefault(r => r.Name == descriptor.ControllerName)); }