Adds support for role injection
C# Shell
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
nuget
src
tools
.gitignore
HowToBuild.txt
LICENSE.txt
Ninject.Extensions.Azure.build
Ninject.Extensions.Azure.sln
Ninject.build
Ninject.include
ReleaseNotes.md
Settings.StyleCop
UnzipDependencies.cmd
build-alpha.cmd
build-beta.cmd
build-rc1.cmd
build-release.cmd
readme.md

readme.md

Ninject.Extensions.Azure NuGet Version NuGet Downloads

This extension adds support for Microsoft Azure Worker Roles.

Getting started

Just derive from NinjectRoleEntryPoint in your WorkerRole.cs (previously RoleEntryPoint) and override the following methods:

The Run method is the main thread of execution for your role instance.

public abstract override void Run();

Implement the CreateKernel method to create and configure your kernel and load the modules required by your role instance.

protected abstract IKernel CreateKernel();

If you like to extend the startup behavior of your role instance just override OnRoleStarted() which is called after CreateKernel.

protected virtual bool OnRoleStarted();

If you like to extend the shutdown behavior of your role instance you have two choices. You can override OnRoleStopping() which is called before the kernel is disposed.

protected virtual void OnRoleStopping();

Addition to that you can also override OnRoleStopped() which is called after the kernel is disposed.

protected virtual void OnRoleStopped();

CI build status

Build Status