Stardust.Interstellar.Rest.DependencyInjection 1.0.2

dotnet add package Stardust.Interstellar.Rest.DependencyInjection --version 1.0.2                
NuGet\Install-Package Stardust.Interstellar.Rest.DependencyInjection -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Stardust.Interstellar.Rest.DependencyInjection" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Stardust.Interstellar.Rest.DependencyInjection --version 1.0.2                
#r "nuget: Stardust.Interstellar.Rest.DependencyInjection, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Stardust.Interstellar.Rest.DependencyInjection as a Cake Addin
#addin nuget:?package=Stardust.Interstellar.Rest.DependencyInjection&version=1.0.2

// Install Stardust.Interstellar.Rest.DependencyInjection as a Cake Tool
#tool nuget:?package=Stardust.Interstellar.Rest.DependencyInjection&version=1.0.2                

Usage

In Startup.cs

  public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            app.AddDependencyInjection<Services>(ControllerTypes.Both);//alternatively only mvc or webapi
            // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=316888
        }
    }

Add a new Class 'Services' to your solution:

public class Services : ServicesConfiguration
    {
        protected override IServiceCollection Configure(IServiceCollection services)
        {
            services.AddInterstellarServices();//Add WebApi controller generation support. nuget: Install-Package Stardust.Interstellar.Rest.Service
            services.AddScoped(s => s.CreateRestClient<IDummyService>("https://localhost:44357/"));//register a rest api client
            services.AddAsController<IDummyService, DummyService>(services.BuildServiceProvider());//Create and bind WebApi controller
            services.FinalizeRegistration();//Finalize controller registration
			//Add additional service bindings
            return services;
        }
    }
Product Compatible and additional computed target framework versions.
.NET Framework net471 is compatible.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Stardust.Interstellar.Rest.DependencyInjection:

Package Downloads
Veracity.Common.OAuth.AspNet

Authentication library for the veracity services sdk for asp.net mvc5

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 10,345 9/21/2018
1.0.0 763 9/18/2018