• 大小: 806KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-25
  • 语言: 其他
  • 标签: 依赖注入  .net  ioc  DI  

资源简介

包括unity autofac等

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IOCPerformanceTest.Core;
using IOCPerformanceTest.Core.Run;

namespace IOCPerformanceTest.App
{
    class Program
    {
        static void Main(string[] args)
        {
            CodeTimer.Initialize();

            Console.WriteLine(“IOC - Singleton“);
            // Autofac Singleton
            RunManager.Start(new AutofacRunner() RunType.Singleton);        
            // Castle Windsor
            RunManager.Start(new WindsorRunner() RunType.Singleton);
            // Unity
            RunManager.Start(new UnityRunner() RunType.Singleton);
            // Spring.NET
            RunManager.Start(new SpringRunner() RunType.Singleton);
            // StructureMap
            RunManager.Start(new StructureMapRunner() RunType.Singleton);
            // Ninject
            RunManager.Start(new NinjectRunner() RunType.Singleton);

            Console.WriteLine(“===================================“);
            Console.WriteLine(“IOC - Transient“);
            // Autofac Singleton
            RunManager.Start(new AutofacRunner() RunType.Transient);
            // Castle Windsor
            RunManager.Start(new WindsorRunner() RunType.Transient);
            // Unity
            RunManager.Start(new UnityRunner() RunType.Transient);
            // Spring.NET
            RunManager.Start(new SpringRunner() RunType.Transient);
            // StructureMap
            RunManager.Start(new StructureMapRunner() RunType.Transient);
            // Ninject
            RunManager.Start(new NinjectRunner() RunType.Transient);

            Console.ReadKey();
        }

    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2635  2011-07-17 10:26  IOCPerformanceTest.sln

     文件       1574  2011-07-17 17:07  IOCPerformanceTest.App\App.config

     文件       2838  2011-07-17 13:38  IOCPerformanceTest.App\IOCPerformanceTest.App.csproj

     文件       5999  2011-07-17 16:45  IOCPerformanceTest.App\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1867  2011-07-17 16:44  IOCPerformanceTest.App\obj\x86\Debug\IOCPerformanceTest.App.csproj.FileListAbsolute.txt

     文件       5632  2011-07-17 15:37  IOCPerformanceTest.App\obj\x86\Debug\IOCPerformanceTest.App.exe

     文件      11776  2011-07-17 15:37  IOCPerformanceTest.App\obj\x86\Debug\IOCPerformanceTest.App.pdb

     文件      40456  2011-07-17 15:37  IOCPerformanceTest.App\obj\x86\Debug\ResolveAssemblyReference.cache

     文件       6005  2011-07-17 17:10  IOCPerformanceTest.App\obj\x86\Release\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1901  2011-07-17 17:10  IOCPerformanceTest.App\obj\x86\Release\IOCPerformanceTest.App.csproj.FileListAbsolute.txt

     文件       5632  2011-07-17 17:10  IOCPerformanceTest.App\obj\x86\Release\IOCPerformanceTest.App.exe

     文件      11776  2011-07-17 17:10  IOCPerformanceTest.App\obj\x86\Release\IOCPerformanceTest.App.pdb

     文件      40496  2011-07-17 17:10  IOCPerformanceTest.App\obj\x86\Release\ResolveAssemblyReference.cache

     文件       1747  2011-07-17 15:37  IOCPerformanceTest.App\Program.cs

     文件       1376  2011-07-17 10:15  IOCPerformanceTest.App\Properties\AssemblyInfo.cs

     文件       3166  2011-07-17 10:42  IOCPerformanceTest.Core\CodeTimer.cs

     文件       1474  2011-07-17 14:49  IOCPerformanceTest.Core\DatabaseManager.cs

     文件        463  2011-07-17 10:35  IOCPerformanceTest.Core\IDatabase.cs

     文件        281  2011-07-17 10:35  IOCPerformanceTest.Core\Identity.cs

     文件       4673  2011-07-17 15:29  IOCPerformanceTest.Core\IOCPerformanceTest.Core.csproj

     文件       6652  2011-07-17 15:37  IOCPerformanceTest.Core\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1770  2011-07-17 15:37  IOCPerformanceTest.Core\obj\Debug\IOCPerformanceTest.Core.csproj.FileListAbsolute.txt

     文件      14848  2011-07-17 15:37  IOCPerformanceTest.Core\obj\Debug\IOCPerformanceTest.Core.dll

     文件      50688  2011-07-17 15:37  IOCPerformanceTest.Core\obj\Debug\IOCPerformanceTest.Core.pdb

     文件      42891  2011-07-17 15:37  IOCPerformanceTest.Core\obj\Debug\ResolveAssemblyReference.cache

     文件       6657  2011-07-17 17:10  IOCPerformanceTest.Core\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1802  2011-07-17 17:10  IOCPerformanceTest.Core\obj\Release\IOCPerformanceTest.Core.csproj.FileListAbsolute.txt

     文件      14336  2011-07-17 17:10  IOCPerformanceTest.Core\obj\Release\IOCPerformanceTest.Core.dll

     文件      48640  2011-07-17 17:10  IOCPerformanceTest.Core\obj\Release\IOCPerformanceTest.Core.pdb

     文件        966  2011-07-17 10:35  IOCPerformanceTest.Core\OracleDatabase.cs

............此处省略44个文件信息

评论

共有 条评论