Interfaces

Project

Pages Core

NuGet packageOwin.Framework.Pages.Core
GitHub sourceOwinFramework.Pages.Core

Home |  Readme

[Example] attribute | The OWIN Framework Pages

The [Example] Attribute

You can attach this attribute to pages, services and service endpoints to include an example usage into self-documentation for the website API.

Example Usage

[IsService("math", "/math/", new[] { Method.Post })]
[Description("<h1>My Service</h1><p>Is awesome</p>")]
internal class MyService
{
    [Endpoint]
    [Description("<h1>My Endpoint</h1><p>Does amazing things</p>")]
    [Example("<p>POST /math/add?a=5&b=6</p>")]
    public void Add(IEndpointRequest request)
    {
    }
}