예제 #1
0
    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());
    }
예제 #2
0
 public static CustomService GetServiceRegistry(this HttpControllerDescriptor descriptor)
 {
     return(CustomServiceRegistryProvider.Registry().FirstOrDefault(r => r.Name == descriptor.ControllerName));
 }