Simplify.DI.Wcf
1.5.2
dotnet add package Simplify.DI.Wcf --version 1.5.2
NuGet\Install-Package Simplify.DI.Wcf -Version 1.5.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="Simplify.DI.Wcf" Version="1.5.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Simplify.DI.Wcf --version 1.5.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Simplify.DI.Wcf, 1.5.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 Simplify.DI.Wcf as a Cake Addin #addin nuget:?package=Simplify.DI.Wcf&version=1.5.2 // Install Simplify.DI.Wcf as a Cake Tool #tool nuget:?package=Simplify.DI.Wcf&version=1.5.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Simplify.DI.Wcf Documentation
Provides ability to use Simplify.DI as IOC container for WCF services.
Available at NuGet as binary package
Adding Simplify.DI.Wcf to WCF pipeline
To use Simplify.DI.Wcf please add Factory="Simplify.DI.Wcf.SimplifyServiceHostFactory" to your WCF service *.svc file.
Service.svc file example:
<%@ ServiceHost Language="C#" Debug="true" Service="MyNamespace.Service"
CodeBehind="Service.svc.cs" Factory="Simplify.DI.Wcf.SimplifyServiceHostFactory" %>
IOC registrations
Simplify.DI registrations should be done via global.asax.cs file (you need to create Global.asax and Global.asax.cs files if you don't have)
Examples
Global.asax
<%@ Application Codebehind="Global.asax.cs" Inherits="MyService.Global" Language="C#" %>
Global.asax.cs
using System;
using Simplify.DI;
namespace MyService
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
DIContainer.Current.Register<ISomeInterface, SomeClass>();
}
}
}
Usage example
Then you can use DI for your service class:
IService.cs
using System.ServiceModel;
namespace MyService
{
[ServiceContract]
public interface IService
{
[OperationContract]
void MyMethod();
}
}
Service.svc.cs
using System;
namespace MyService
{
public class Service : IService
{
public Service(ISomeInterface dependency)
{
}
public void MyMethod()
{
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.8
- Simplify.DI (>= 4.2.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.5.2 | 100 | 2/18/2025 |
1.5.1 | 253 | 8/1/2023 |
1.5.0 | 505 | 7/17/2021 |
1.4.0 | 723 | 9/25/2019 |
1.3.0 | 624 | 9/12/2019 |
1.2.1 | 614 | 7/2/2019 |
1.2.0 | 857 | 11/14/2018 |
1.1.4 | 1,039 | 8/14/2017 |
1.1.3 | 1,084 | 8/18/2016 |
1.1.2 | 1,095 | 6/30/2016 |
1.1.1 | 1,176 | 1/11/2016 |
1.1.0 | 1,235 | 11/23/2015 |
1.0.1 | 1,252 | 4/2/2015 |