Adding inline documentation for Owin types

The people have spoken!
This commit is contained in:
Zoltán Lehóczky
2015-01-14 23:31:29 +01:00
parent 6dd00789f3
commit 444ec29d36
4 changed files with 32 additions and 0 deletions

View File

@@ -1,7 +1,18 @@
using System.Collections.Generic;
namespace Orchard.Owin {
/// <summary>
/// Represents a provider that makes Owin middlewares available for the Orchard Owin pipeline.
/// </summary>
/// <remarks>
/// If you want to write an Owin middleware and inject it into the Orchard Owin pipeline, implement this interface. For more information
/// about Owin <see cref="!:http://owin.org/">http://owin.org/</see>.
/// </remarks>
public interface IOwinMiddlewareProvider : IDependency {
/// <summary>
/// Gets Owin middlewares that will be injected into the Orchard Owin pipeline.
/// </summary>
/// <returns>Owin middlewares that will be injected into the Orchard Owin pipeline.</returns>
IEnumerable<OwinMiddleware> GetOwinMiddlewares();
}
}

View File

@@ -3,6 +3,9 @@ using System.Threading.Tasks;
using Owin;
namespace Orchard.Owin {
/// <summary>
/// A special Owin middleware that is executed last in the Owin pipeline and runs the non-Owin part of the request.
/// </summary>
public static class OrchardMiddleware {
public static IAppBuilder UseOrchard(this IAppBuilder app) {
app.Use(async (context, next) => {

View File

@@ -2,8 +2,22 @@
using Owin;
namespace Orchard.Owin {
/// <summary>
/// An Owin middleware representation that can make changes to the Owin pipeline, like registering middlewares to be injected into the Orchard
/// Owin pipeline.
/// </summary>
public class OwinMiddleware {
/// <summary>
/// Gets or sets the delegate that you can use to make changes to the Owin pipeline, like registering middlewares to be injected into
/// the Orchard Owin pipeline.
/// </summary>
public Action<IAppBuilder> Configure { get; set; }
/// <summary>
/// Gets or sets the priority value that decides the order in which such objects are processed. I.e. "0" will run before "10",
/// but middlewares without a priority value will run before the ones that have it set.
/// Note that this priority notation is the same as the one for shape placement (so you can e.g. use ":before").
/// </summary>
public string Priority { get; set; }
}
}

View File

@@ -1,6 +1,10 @@
using Owin;
namespace Orchard.Owin {
/// <summary>
/// The entry point for the Owin pipeline that doesn't really do anything on its own but is necessary for bootstrapping.
/// </summary>
/// <remarks>Also, startups are hip nowadays.</remarks>
public class Startup {
public void Configuration(IAppBuilder app) {
app.Use((context, next) => {