Skip to content

Commit 06720cf

Browse files
author
DwGoing
committed
📃 docs: 更新README
1 parent f737eb0 commit 06720cf

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

README.md

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -4,69 +4,3 @@
44
### 0x1 项目简介
55

66
基于Autofac的NetCore快速开发框架,这个框架旨在将服务注入简单化,把Autofac中常用的部分暴露出来,并融合了其他几个项目开发常用的组件。让整个开发的过程变得简单快速。当然,如果你有更复杂的业务需求,你可以直接引用Autofac来对本框架进行扩展。
7-
8-
---
9-
10-
### 0x2 组件列表
11-
12-
版本说明:NETVersion.ReleaseVersion.FixVersion
13-
14-
| 组件 | 说明 | 版本 |
15-
| :-------------------------: | :-----------: | :----------------------------------------------------------: |
16-
| DwFramework.Core | 核心库 | [![](https://img.shields.io/badge/Nuget-5.1.2-brightgreen.svg)](https://www.nuget.org/packages/DwFramework.Core/) |
17-
| DwFramework.SqlSugar | SqlSugar封装库 | [![](https://img.shields.io/badge/Nuget-5.1.2-brightgreen.svg)](https://www.nuget.org/packages/DwFramework.SqlSugar/) |
18-
| DwFramework.RabbitMQ | RabbitMQ封装库 | [![](https://img.shields.io/badge/Nuget-5.1.2-brightgreen.svg)](https://www.nuget.org/packages/DwFramework.RabbitMQ/) |
19-
| DwFramework.Quartz | Quartz封装库 | [![](https://img.shields.io/badge/Nuget-5.1.2-brightgreen.svg)](https://www.nuget.org/packages/DwFramework.Quartz/) |
20-
| DwFramework.Web | 网络库 | [![](https://img.shields.io/badge/Nuget-5.1.2-brightgreen.svg)](https://www.nuget.org/packages/DwFramework.Web/) |
21-
22-
---
23-
24-
### 0x3 简单示例
25-
26-
```c#
27-
class Program
28-
{
29-
static async Task Main(string[] args)
30-
{
31-
var host = new ServiceHost();
32-
host.ConfigureLogging(builder => builder.UserNLog());
33-
host.RegisterFromAssemblies();
34-
host.OnHostStarted += provider =>
35-
{
36-
foreach (var item in provider.GetServices<I>())
37-
Console.WriteLine(item.Do(5, 6));
38-
};
39-
await host.RunAsync();
40-
}
41-
}
42-
43-
// 定义接口
44-
public interface I
45-
{
46-
int Do(int a, int b);
47-
}
48-
49-
// 定义实现
50-
[Registerable(typeof(I))]
51-
public class A : I
52-
{
53-
public A() { }
54-
55-
public int Do(int a, int b)
56-
{
57-
return a + b;
58-
}
59-
}
60-
61-
// 定义实现
62-
[Registerable(typeof(I))]
63-
public class B : I
64-
{
65-
public B() { }
66-
67-
public int Do(int a, int b)
68-
{
69-
return a * b;
70-
}
71-
}
72-
```

0 commit comments

Comments
 (0)