Skip to content

Commit

Permalink
ControllerHandler : Allow Multiple HttpMethod Attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
shanielh committed Mar 19, 2015
1 parent 6b4ba39 commit a074a31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion uhttpsharp.dll.nuspec
Expand Up @@ -2,7 +2,7 @@
<package>
<metadata>
<id>uHttpSharp</id>
<version>0.1.6.15</version>
<version>0.1.6.16</version>
<title>uHttpSharp</title>
<authors>Shani Elharrar, Joe White, Hüseyin Uslu</authors>
<owners>Shani Elharrar, Joe White, Hüseyin Uslu</owners>
Expand Down
4 changes: 2 additions & 2 deletions uhttpsharp/Handlers/ControllerHandler.cs
Expand Up @@ -243,8 +243,8 @@ private ControllerFunction CreateControllerFunction(ControllerMethod controllerM

var foundMethod =
(from method in controllerMethod.ControllerType.GetMethods(BindingFlags.Instance | BindingFlags.Public)
let attribute = method.GetCustomAttribute<HttpMethodAttribute>()
where attribute != null && attribute.HttpMethod == controllerMethod.Method
let attributes = method.GetCustomAttributes<HttpMethodAttribute>()
where attributes.Any(a => a.HttpMethod == controllerMethod.Method)
select method).FirstOrDefault();

if (foundMethod == null)
Expand Down

0 comments on commit a074a31

Please sign in to comment.