Component.As.Service 1.0.0

Component.As.Service : Serves your Component. On the web. As a Service.

Add Component.As.Service to your AspNetCore app in the usual way and behold as your application component is exposed to the world at `http://localhost:5000/MyApplicationComponent/MethodName?parameterA=a&parameterB=B`
```
public class Startup
{
   public void ConfigureServices(IServiceCollection services)
   {
       services
           /*  .AddMvc() here if you required MvcOptions */
           .AddComponentAsService();
   }

   public void Configure(IApplicationBuilder app, IHostingEnvironment env)
   {
       app
          /* .UseMvc() here if you require custom Mvc configuration */
          .UseComponentAsService<MyApplicationComponent>();
   }
}
```
### Q&A

* And form post and json post and complex objects?
Yes. Anything that Mvc can normally deliver to an Action by the magic of ModelBinding will
be delivered to your component method.

* What about Route Constraints and REST and things?
For sophisticated HTTP-specific concerns, write a traditional MVC Controller which
takes your Component as a dependency.

* Really?
Yes really. This is very much a 'Keep it Simple' offer.

Install-Package Component.As.Service -Version 1.0.0
dotnet add package Component.As.Service --version 1.0.0
<PackageReference Include="Component.As.Service" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Component.As.Service --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Add Component.As.Service to your AspNetCore app in the usual way and behold as your application component is exposed to the world at http://localhost:5000/MyApplicationComponent/MethodName?parameterA=a&amp;parameterB=B

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services
            /*  .AddMvc() here if you required MvcOptions */
            .AddComponentAsService();
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app
           /* .UseMvc() here if you require custom Mvc configuration */
           .UseComponentAsService<MyApplicationComponent>();
    }
}

Q&A

  • And form post and json post and complex objects?
    Yes. Anything that Mvc can normally deliver to an Action by the magic of ModelBinding will
    be delivered to your component method.

  • What about Route Constraints and REST and things?
    For sophisticated HTTP-specific concerns, write a traditional MVC Controller which
    takes your Component as a dependency.

  • Really?
    Yes really. This is very much a 'Keep it Simple' offer.

Add Component.As.Service to your AspNetCore app in the usual way and behold as your application component is exposed to the world at http://localhost:5000/MyApplicationComponent/MethodName?parameterA=a&amp;parameterB=B

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services
            /*  .AddMvc() here if you required MvcOptions */
            .AddComponentAsService();
    }

    public void Configure(IApplicationBuilder app, IHostingEnvironment env)
    {
        app
           /* .UseMvc() here if you require custom Mvc configuration */
           .UseComponentAsService<MyApplicationComponent>();
    }
}

Q&A

  • And form post and json post and complex objects?
    Yes. Anything that Mvc can normally deliver to an Action by the magic of ModelBinding will
    be delivered to your component method.

  • What about Route Constraints and REST and things?
    For sophisticated HTTP-specific concerns, write a traditional MVC Controller which
    takes your Component as a dependency.

  • Really?
    Yes really. This is very much a 'Keep it Simple' offer.

Release Notes

ChangeLog
     --------
     1.0.0.0 Component.As.Service

Version History

Version Downloads Last updated
1.0.0 108 11/4/2018