• 大小: 3.46M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-24
  • 语言: C#
  • 标签: AutoFac  demo  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AutofacDemo
{
    public interface IOutput
    {
        void Write(string content);
    }

    public class ConsoleOutput : IOutput
    {
        public void Write(string content)
        {
            Console.WriteLine(content);
        }
    }


    public interface IDateWriter
    {
        void WriteDate();
    }

    public class TodayWriter : IDateWriter
    {
        private IOutput _output;
        public TodayWriter(IOutput output)
        {
            this._output = output;
        }

        public void WriteDate()
        {
            this._output.Write(DateTime.Today.ToShortDateString());
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-02-25 13:59  AutofacDemo\
     目录           0  2019-02-25 13:55  AutofacDemo\.vs\
     目录           0  2019-02-25 13:55  AutofacDemo\.vs\AutofacDemo\
     目录           0  2019-02-25 13:55  AutofacDemo\.vs\AutofacDemo\v15\
     文件       54272  2019-02-25 17:34  AutofacDemo\.vs\AutofacDemo\v15\.suo
     目录           0  2019-02-25 13:55  AutofacDemo\.vs\AutofacDemo\v15\Server\
     目录           0  2019-02-25 17:34  AutofacDemo\.vs\AutofacDemo\v15\Server\sqlite3\
     文件           0  2019-02-25 13:55  AutofacDemo\.vs\AutofacDemo\v15\Server\sqlite3\db.lock
     文件      479232  2019-02-25 17:34  AutofacDemo\.vs\AutofacDemo\v15\Server\sqlite3\storage.ide
     目录           0  2019-02-25 15:20  AutofacDemo\AutofacDemo\
     文件        1131  2019-02-25 13:55  AutofacDemo\AutofacDemo.sln
     文件         534  2019-02-25 15:16  AutofacDemo\AutofacDemo\App.config
     文件        3244  2019-02-25 15:16  AutofacDemo\AutofacDemo\AutofacDemo.csproj
     目录           0  2019-02-25 13:55  AutofacDemo\AutofacDemo\bin\
     目录           0  2019-02-25 15:20  AutofacDemo\AutofacDemo\bin\Debug\
     文件      229888  2019-02-18 12:35  AutofacDemo\AutofacDemo\bin\Debug\Autofac.dll
     文件        5632  2017-10-17 05:38  AutofacDemo\AutofacDemo\bin\Debug\Autofac.Extras.CommonServiceLocator.dll
     文件        2532  2017-10-17 05:38  AutofacDemo\AutofacDemo\bin\Debug\Autofac.Extras.CommonServiceLocator.xml
     文件      382944  2019-02-18 12:35  AutofacDemo\AutofacDemo\bin\Debug\Autofac.pdb
     文件      473901  2019-02-18 12:35  AutofacDemo\AutofacDemo\bin\Debug\Autofac.xml
     文件        6144  2019-02-25 15:20  AutofacDemo\AutofacDemo\bin\Debug\AutofacDemo.exe
     文件         534  2019-02-25 15:16  AutofacDemo\AutofacDemo\bin\Debug\AutofacDemo.exe.config
     文件       19968  2019-02-25 15:20  AutofacDemo\AutofacDemo\bin\Debug\AutofacDemo.pdb
     文件       10752  2017-10-10 13:54  AutofacDemo\AutofacDemo\bin\Debug\CommonServiceLocator.dll
     文件         801  2019-02-25 13:58  AutofacDemo\AutofacDemo\Module.cs
     目录           0  2019-02-25 13:55  AutofacDemo\AutofacDemo\obj\
     目录           0  2019-02-25 15:16  AutofacDemo\AutofacDemo\obj\Debug\
     文件           0  2019-02-25 15:20  AutofacDemo\AutofacDemo\obj\Debug\AutofacDemo.csproj.CopyComplete
     文件          42  2019-02-25 15:16  AutofacDemo\AutofacDemo\obj\Debug\AutofacDemo.csproj.CoreCompileInputs.cache
     文件        1017  2019-02-25 15:20  AutofacDemo\AutofacDemo\obj\Debug\AutofacDemo.csproj.FileListAbsolute.txt
     文件       41026  2019-02-25 15:16  AutofacDemo\AutofacDemo\obj\Debug\AutofacDemo.csprojAssemblyReference.cache
............此处省略52个文件信息

评论

共有 条评论