Skip to content

digipolisantwerp/application_aspnetcore

Repository files navigation

ApplicationServices Library

Application services for ASP.NET Core applications.

Table of Contents

Installation

This package is hosted on Myget on the following feed : https://www.myget.org/F/digipolisantwerp/api/v3/index.json.
To add it to a project, you add the package to the csproj file :

  <ItemGroup>
    <PackageReference Include="Digipolis.ApplicationServices" Version="3.1.1" />
  </ItemGroup>

or if your project still works with project.json :

"dependencies": {
    "Digipolis.ApplicationServices":  "3.1.1"
 }

In Visual Studio you can also use the NuGet Package Manager to do this.

Startup

To use the library's services, you add them in the Configure method of the Startup class :

services.AddApplicationServices(options => {
    options.ApplicationId = "a0eab541-0f09-4540-abbf-88cc1fe02a90";
    options.ApplicationName = "MyApplication";
});

IApplicationContext

You can inject the IApplicationContext in your objects to have access to the application's identification. The context provides the following properties :

  • ApplicationId : the application's unique id (given in the startup options).
  • ApplicationName : the application's (friendly) name (given in the startup options).
  • InstanceId : the unique id of the application's running instance (is generated at startup).
  • InstanceName : the name of the application's running instance (is generated at startup).
  • ApplicationVersion : the application's version.
  • InternalApplicationName : the application's internal name (the name of the .NET Core project).

Instance

In a load-balanced, scalable environment, you will run several instances of the same application. The instance properties can be used to identify each instance of this application (e.g. in logs).

Application API

coming soon.

Contributing

Pull requests are always welcome, however keep the following things in mind:

  • New features (both breaking and non-breaking) should always be discussed with the repo's owner. If possible, please open an issue first to discuss what you would like to change.
  • Fork this repo and issue your fix or new feature via a pull request.
  • Please make sure to update tests as appropriate. Also check possible linting errors and update the CHANGELOG if applicable.

Support

Marc Wouters ([email protected])

About

Application services for ASP.NET Core applications.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •