Skip to content

Commit

Permalink
md
Browse files Browse the repository at this point in the history
  • Loading branch information
vipwan committed Nov 12, 2023
1 parent 91b159d commit 00af7e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Biwen.AutoClassGen.TestConsole/Decors/IHelloService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[AutoDecor(typeof(HelloServiceDecor2))]
[AutoDecor<HelloServiceDecor1>]
public interface IHelloService
public partial interface IHelloService
{
string SayHello(string name);
}
Expand All @@ -20,7 +20,7 @@ public string SayHello(string name)
/// ClassService
/// </summary>
[AutoDecor<ClassServiceDecor>]
public class ClassService
public partial class ClassService
{
/// <summary>
/// 请注意,如果TService是一个类,而不是interface,这里的virtual关键字是必须的
Expand Down
11 changes: 4 additions & 7 deletions Gen-Decor.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -32,7 +33,7 @@
/// ClassService
/// </summary>
[AutoDecor<ClassServiceDecor>]
public class ClassService
public partial class ClassService
{
/// <summary>
/// 请注意,如果TService是一个类,而不是interface,这里的virtual关键字是必须的
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 00af7e3

Please sign in to comment.