Permalink
Browse files

Changing back to use TypeDescriptor

  • Loading branch information...
1 parent b0f6759 commit 2f549bd27baafea1d5ceab5baae33d6c4ec57b7b @mythz mythz committed Mar 17, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/ServiceStack/ServiceHost/ServiceController.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
@@ -155,7 +156,7 @@ public void RegisterCommon(Type serviceType, Type requestType, Type responseType
public void RegisterRestPaths(Type requestType)
{
- var attrs = requestType.GetCustomAttributes(typeof(RouteAttribute), true);
+ var attrs = TypeDescriptor.GetAttributes(requestType).OfType<RouteAttribute>();
foreach (RouteAttribute attr in attrs)
{
var restPath = new RestPath(requestType, attr.Path, attr.Verbs, attr.Summary, attr.Notes);

0 comments on commit 2f549bd

Please sign in to comment.