Ninject WCF extensions
C# Batchfile ASP
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
nuget-selfhost
nuget-webhost
nuget
packages
src Fix for .net 3.5 Oct 25, 2014
tools
.gitignore
HowToBuild.txt
LICENSE.txt
Ninject.Extensions.Wcf.build Adapted scripts to mono 3.4 Apr 26, 2014
Ninject.Extensions.Wcf.sln
Ninject.Extensions.Wcf.sln.DotSettings
Ninject.build
Ninject.include
Packages.dgml
README.md
ReleaseNotes.md
UnzipDependencies.cmd
build-alpha.cmd
build-beta.cmd
build-rc1.cmd
build-release.cmd
build.cmd

README.md

Ninject.Extensions.Wcf NuGet Version NuGet Downloads

This extension adds support for dependency injection for WCF services and behaviors.

There are three Ninject ServiceHostFactorys which could be used in IIS host and self host.

  • Ninject.Extensions.Wcf.NinjectServiceHostFactory is used for ordinary services
  • Ninject.Extensions.Wcf.NinjectWebServiceHostFactory is used for REST services
  • Ninject.Extensions.Wcf.NinjectDataServiceHostFactory is used for data services

There is a NinjectBehaviorExtensionElement which could resolve WCF behaviors with dependencies.

<system.serviceModel>
...
  <extensions>
    <behaviorExtensions>
      <add name="yourBehaviorName" 
           type="Ninject.Extensions.Wcf.BaseNinjectBehaviorExtensionElement+NinjectBehaviorExtensionElement`1[[YourAssembly.YourBehavior, YourAssembly]], Ninject.Extensions.Wcf" />
    </behaviorExtensions>
  </extensions>
...
</system.serviceModel>

You can find more details in wiki page.

CI build status

Build Status