Cleanup + TODO
This commit is contained in:
parent
f1efbde29d
commit
54c73e4227
|
|
@ -33,7 +33,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
InitializeController(controller, actionContext);
|
||||
|
||||
return controller;
|
||||
}
|
||||
} // TODO: Should we not catch it here?
|
||||
catch (ReflectionTypeLoadException)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Microsoft.AspNet.Mvc.Filters
|
||||
{
|
||||
public class FilterPipelineBuilder<T>
|
||||
public class FilterPipelineBuilder<TContext>
|
||||
{
|
||||
private readonly IFilter<T>[] _filters;
|
||||
private readonly T _context;
|
||||
private readonly IFilter<TContext>[] _filters;
|
||||
private readonly TContext _context;
|
||||
|
||||
// FilterDescriptors are already ordered externally.
|
||||
public FilterPipelineBuilder(IEnumerable<IFilter<T>> filters, T context)
|
||||
public FilterPipelineBuilder(IEnumerable<IFilter<TContext>> filters, TContext context)
|
||||
{
|
||||
_filters = filters.ToArray();
|
||||
_context = context;
|
||||
|
|
@ -26,13 +26,13 @@ namespace Microsoft.AspNet.Mvc.Filters
|
|||
|
||||
private class CallNextAsync
|
||||
{
|
||||
private readonly T _context;
|
||||
private readonly IFilter<T>[] _filters;
|
||||
private readonly TContext _context;
|
||||
private readonly IFilter<TContext>[] _filters;
|
||||
private readonly Func<Task> _next;
|
||||
|
||||
private int _index;
|
||||
|
||||
public CallNextAsync(T context, IFilter<T>[] filters)
|
||||
public CallNextAsync(TContext context, IFilter<TContext>[] filters)
|
||||
{
|
||||
_context = context;
|
||||
_next = CallNextProvider;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Microsoft.AspNet.Mvc.Filters
|
||||
{
|
||||
public interface IFilter<T>
|
||||
public interface IFilter<TContext>
|
||||
{
|
||||
Task Invoke(T context, Func<Task> next);
|
||||
Task Invoke(TContext context, Func<Task> next);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
|
||||
if (controller == null)
|
||||
{
|
||||
// TODO: See if these return 404s should turn into 500s
|
||||
actionResult = new HttpStatusCodeResult(404);
|
||||
}
|
||||
else
|
||||
|
|
@ -62,6 +63,7 @@ namespace Microsoft.AspNet.Mvc
|
|||
|
||||
if (method == null)
|
||||
{
|
||||
// TODO: See if these return 404s should turn into 500s
|
||||
actionResult = new HttpStatusCodeResult(404);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue