HCI.Core.Helper 1.0.2

ASP.NET Core help tools

There is a newer version of this package available.
See the version list below for details.
Install-Package HCI.Core.Helper -Version 1.0.2
dotnet add package HCI.Core.Helper --version 1.0.2
<PackageReference Include="HCI.Core.Helper" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HCI.Core.Helper --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: HCI.Core.Helper, 1.0.2"
For F# scripts that support #r syntax, copy this into the source code to reference the package.

HCI.Core.Helper

Features

HCI.Core.Helper is a NuGet library that you can automatically register all services by following the name pattern by assembly.

The following platforms are supported:

  • .NET Core

Getting started

The easiest way to get started is by installing the available NuGet packages and if you're not a NuGet fan then follow these steps:

Download the latest runtime library from: https://www.nuget.org/api/v2/package/HCI.Core.Helper.
Or install the latest package:
PM> Install-Package HCI.Core.Helper

A Quick Example

Services Register

Automatically register all services by following the name pattern by assembly.

  1. In Startup.cs enter the code according to line 4 at the end of the ConfigureServices method;
  2. Use the ServicesRegister class to trigger the desired method;
  3. Enter the service container;
  4. Enter the assembly of a project implementation target of the dependency injection;
  5. Enter the suffix pattern for the services to be registered;
  6. Optionally, enter a suffix pattern for the used contract.

Add services as scope

public void ConfigureServices(IServiceCollection services)
{
	// TODO code here.
	ServicesRegister.AddServicesScope(services, typeof(FooService).Assembly, "Service");
}

Add services as singleton

public void ConfigureServices(IServiceCollection services)
{
	// TODO code here.
	ServicesRegister.AddServicesSingleton(services, typeof(FooService).Assembly, "Service");
}

Add services as transient

public void AddServicesTransient(IServiceCollection services)
{
	// TODO code here.
	ServicesRegister.AddServicesScope(services, typeof(FooService).Assembly, "Service");
}

Report Support

To report errors, questions and suggestions go to the link

HCI.Core.Helper

Features

HCI.Core.Helper is a NuGet library that you can automatically register all services by following the name pattern by assembly.

The following platforms are supported:

  • .NET Core

Getting started

The easiest way to get started is by installing the available NuGet packages and if you're not a NuGet fan then follow these steps:

Download the latest runtime library from: https://www.nuget.org/api/v2/package/HCI.Core.Helper.
Or install the latest package:
PM> Install-Package HCI.Core.Helper

A Quick Example

Services Register

Automatically register all services by following the name pattern by assembly.

  1. In Startup.cs enter the code according to line 4 at the end of the ConfigureServices method;
  2. Use the ServicesRegister class to trigger the desired method;
  3. Enter the service container;
  4. Enter the assembly of a project implementation target of the dependency injection;
  5. Enter the suffix pattern for the services to be registered;
  6. Optionally, enter a suffix pattern for the used contract.

Add services as scope

public void ConfigureServices(IServiceCollection services)
{
	// TODO code here.
	ServicesRegister.AddServicesScope(services, typeof(FooService).Assembly, "Service");
}

Add services as singleton

public void ConfigureServices(IServiceCollection services)
{
	// TODO code here.
	ServicesRegister.AddServicesSingleton(services, typeof(FooService).Assembly, "Service");
}

Add services as transient

public void AddServicesTransient(IServiceCollection services)
{
	// TODO code here.
	ServicesRegister.AddServicesScope(services, typeof(FooService).Assembly, "Service");
}

Report Support

To report errors, questions and suggestions go to the link

Release Notes

Bug fix

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.2.0 241 8/2/2019
1.0.3 191 7/18/2019
1.0.2 306 11/15/2018
1.0.1 314 11/15/2018
1.0.0 369 11/15/2018