aspnetcore/samples/RoutingSample/OwinRouteEndpoint.cs

25 lines
678 B
C#
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNet.Routing;
namespace RoutingSample
{
internal class OwinRouteEndpoint : IRouteEndpoint
{
private readonly Func<IDictionary<string, object>, Task> _appFunc;
public OwinRouteEndpoint(Func<IDictionary<string, object>, Task> appFunc)
{
_appFunc = appFunc;
}
public Task Invoke(IDictionary<string, object> context)
{
return _appFunc(context);
}
}
}