JCoder.Ioc4Net 2.1.0

dotnet add package JCoder.Ioc4Net --version 2.1.0                
NuGet\Install-Package JCoder.Ioc4Net -Version 2.1.0                
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="JCoder.Ioc4Net" Version="2.1.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JCoder.Ioc4Net --version 2.1.0                
#r "nuget: JCoder.Ioc4Net, 2.1.0"                
#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 JCoder.Ioc4Net as a Cake Addin
#addin nuget:?package=JCoder.Ioc4Net&version=2.1.0

// Install JCoder.Ioc4Net as a Cake Tool
#tool nuget:?package=JCoder.Ioc4Net&version=2.1.0                

JCoder.Ioc4Net

属性
作者(Authors) Jackie Law
版权(Copyright) Copyright © Jackie Law. All rights reserved.
协议 MIT
联系(QQ) 1378071853
联系(Wechat) JackieLaw1024
联系(Email) JackieLaw-dev@outlook.com

目录

[TOC]

介绍

  1. JCoder = Jackie who a coder.;
  2. C#库;
  3. A simple IOC library.(一款简易款的Ioc操作类库)。
  4. AUpgrader version of JCore.Ioc4Net.(JCore.Ioc4Net的升级版。);

架构说明

.Net框架

.Net框架 .Net项目类型
.Net 5 -

引用类库

引用类库 版本
- -

相关类库

相关类库 说明
JCore.Ioc4Net 一款简易款的Ioc操作类库。JCoder.Ioc4Net的旧版本。
JCoder.Ioc4Net 一款简易款的Ioc操作类库。

获取方式

  1. 版本要求:>=1.2.1
  2. 以版本1.2.1为例
获取方式 描述
Package Manager Install-Package JCoder.Ioc4Net -Version 1.2.1
.Net CLI dotnet add package JCoder.Ioc4Net --version 1.2.1
PackageReference <PackageReference Include="JCoder.Ioc4Net" Version="1.2.1" />
Paket CLI paket add JCoder.Ioc4Net --version 1.2.1
Script&Interactive #r "nuget: JCoder.Ioc4Net, 1.2.1"
Cake // Install JCoder.Ioc4Net as a Cake Addin<br/>#addin nuget:?package=JCoder.Ioc4Net&version=1.2.1<br/><br/>// Install JCoder.Ioc4Net as a Cake Tool<br/>#tool nuget:?package=JCoder.Ioc4Net&version=1.2.1

使用说明

创建实例

  1. IocCastle
   IIocCastle _iocCastle = new IocCastle();
  1. 加载Assembly
   IIocCastle _iocCastle = new IocCastle();
   var _assemblies = AppDomain.CurrentDomain.GetAssemblies();
    foreach (var a in _assemblies)
    {
        _iocCastle.RegisterAssembly(a);
    }
  1. 添加Assembly过滤(加载Assembly)
   IIocCastle _iocCastle = new IocCastle();
   
   //添加文件过滤(根据文件名称)
   _iocCastle.AddFilter(new IocNameFileFilter
   {
       Prefix="JCoder.Ioc4Net.",
       Postfix = ".dll",
   });
   
   //添加Assembly过滤(根据Assembly名称)
   _iocCastle.AddFilter(new IocAssemblyNameFilter
   {
       Prefix="JCoder.Ioc4Net."
   });

   //添加Namespace过滤(根据Namespace名称)
   _iocCastle.AddFilter(new IocNamespaceBunchFilter
   {
       Prefix="JCoder.Ioc4Net."
   });

  1. 创建实例(依赖注入)
   public interface IServiceA { } 
   public class ServiceB
   {
       public ServiceB(IServiceA a) { }
   }
    
   IIocCastle _iocCastle = new IocCastle();
   //_iocCastle.RegisterAssembly(a);
   var b = _iocCastle.Create<ServiceB>();

实例使用

  1. 参考JCoder.Ioc4Net
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.

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
2.1.0 333 12/8/2022
2.0.2 441 3/9/2022

Please contact Jackie by QQ 1378071853 or E-mail JackieLaw-dev@outlook.com;