-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,14 @@ | |
|
||
``` | ||
|
||
### Define Base Service (IHelloService or Class) & mark AutoDecorAttribute | ||
### Define Base Service (IService or Class) & mark `[AutoDecor]` | ||
- 请注意,如需要避免代码侵入,可以使用`partial`拆分业务代码和特性 | ||
|
||
```c# | ||
|
||
[AutoDecor(typeof(HelloServiceDecor1))] | ||
[AutoDecor<HelloServiceDecor2>] | ||
public interface IHelloService | ||
public partial interface IHelloService | ||
{ | ||
string SayHello(string name); | ||
} | ||
|
@@ -32,7 +33,7 @@ | |
/// ClassService | ||
/// </summary> | ||
[AutoDecor<ClassServiceDecor>] | ||
public class ClassService | ||
public partial class ClassService | ||
{ | ||
/// <summary> | ||
/// 请注意,如果TService是一个类,而不是interface,这里的virtual关键字是必须的 | ||
|
@@ -110,10 +111,6 @@ | |
|
||
```c# | ||
// <auto-generated /> | ||
// author:[email protected] 万雅虎 | ||
// issue:https://github.com/vipwan/Biwen.AutoClassGen/issues | ||
// 如果你在使用中遇到问题,请第一时间issue,谢谢! | ||
// This file is generated by Biwen.AutoClassGen.SourceGenerator | ||
#pragma warning disable | ||
namespace Microsoft.Extensions.DependencyInjection | ||
{ | ||
|