You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ef3abc
Browse filesBrowse the repository at this point in the historyBrowse files
Make Stunts.DynamicProxy an explicit opt-in package
The Stunts package no longer embeds Stunts.DynamicProxy. Compile-time stunts are the default. Projects that can't use them (Visual Basic, C# before 9.0), or don't want them, now install the Stunts.DynamicProxy package explicitly.
Copy file name to clipboardExpand all lines: readme.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Stunts is a .NET Standard 2.0 library and runs on any runtime that supports that
40
40
41
41
Compile-time proxy generation leverages [Roslyn source generators](https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md) and therefore requires C# 9.0, which at this time is included in Visual Studio 16.8 (preview or later) and the .NET 5.0 SDK (RC or later). Compile-time generated proxies support the broadest possible run-time platforms since they don't require any Reflection.Emit, and also don't pay that performance cost either.
42
42
43
-
Whenever compile-time proxy generation is not available, a fallback generation strategy is used instead, which leverages [Castle DynamicProxy](https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-introduction.md) to provide the run-time code generation.
43
+
Whenever compile-time proxy generation is not available (i.e. Visual Basic or C# versions before 9.0), install the `Stunts.DynamicProxy` package instead, which leverages [Castle DynamicProxy](https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-introduction.md) to provide the run-time code generation.
44
44
45
45
The client API for configuring proxy behaviors in either case is exactly the same.
46
46
@@ -109,17 +109,17 @@ As you can see, the Stunts API itself uses the same extensibility mechanism that
109
109
110
110
### Static vs Dynamic Stunts
111
111
112
-
Depending on the project and platform, Stunts will automatically choose whether to use run-time proxies or compile-time ones (powered by Roslyn source generators). The latter are only supported when building C# 9.0+ projects.
112
+
By default, Stunts generates proxies at compile-time (powered by Roslyn source generators), which is only supported when building C# 9.0+ projects.
113
113
114
-
You can opt out of the static stunts by setting `EnableCompileTimeStunts=false` in your project file:
114
+
Whenever compile-time stunts are not supported (or not wanted), install the `Stunts.DynamicProxy` package, which switches the project to run-time proxies based on Castle.Core:
This will switch the project to run-time proxies based on Castle.Core.
122
+
The package sets `EnableCompileTimeStunts=false` for you. Projects that can't use compile-time stunts and don't reference `Stunts.DynamicProxy` get a build warning (`ST011`).
Copy file name to clipboardExpand all lines: src/Stunts.CodeAnalysis/readme.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Stunts is a .NET Standard 2.0 library and runs on any runtime that supports that
18
18
19
19
Compile-time proxy generation leverages [Roslyn source generators](https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md) and therefore requires C# 9.0, which at this time is included in Visual Studio 16.8 (preview or later) and the .NET 5.0 SDK (RC or later). Compile-time generated proxies support the broadest possible run-time platforms since they don't require any Reflection.Emit, and also don't pay that performance cost either.
20
20
21
-
Whenever compile-time proxy generation is not available, a fallback generation strategy is used instead, which leverages [Castle DynamicProxy](https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-introduction.md) to provide the run-time code generation.
21
+
Whenever compile-time proxy generation is not available (i.e. Visual Basic or C# versions before 9.0), install the `Stunts.DynamicProxy` package instead, which leverages [Castle DynamicProxy](https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-introduction.md) to provide the run-time code generation.
22
22
23
23
The client API for configuring proxy behaviors in either case is exactly the same.
24
24
@@ -87,17 +87,17 @@ As you can see, the Stunts API itself uses the same extensibility mechanism that
87
87
88
88
### Static vs Dynamic Stunts
89
89
90
-
Depending on the project and platform, Stunts will automatically choose whether to use run-time proxies or compile-time ones (powered by Roslyn source generators). The latter are only supported when building C# 9.0+ projects.
90
+
By default, Stunts generates proxies at compile-time (powered by Roslyn source generators), which is only supported when building C# 9.0+ projects.
91
91
92
-
You can opt out of the static stunts by setting `EnableCompileTimeStunts=false` in your project file:
92
+
Whenever compile-time stunts are not supported (or not wanted), install the `Stunts.DynamicProxy` package, which switches the project to run-time proxies based on Castle.Core:
This will switch the project to run-time proxies based on Castle.Core.
100
+
The package sets `EnableCompileTimeStunts=false` for you. Projects that can't use compile-time stunts and don't reference `Stunts.DynamicProxy` get a build warning (`ST011`).
Copy file name to clipboardExpand all lines: src/Stunts.DynamicProxy/readme.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Stunts is a .NET Standard 2.0 library and runs on any runtime that supports that
18
18
19
19
Compile-time proxy generation leverages [Roslyn source generators](https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md) and therefore requires C# 9.0, which at this time is included in Visual Studio 16.8 (preview or later) and the .NET 5.0 SDK (RC or later). Compile-time generated proxies support the broadest possible run-time platforms since they don't require any Reflection.Emit, and also don't pay that performance cost either.
20
20
21
-
Whenever compile-time proxy generation is not available, a fallback generation strategy is used instead, which leverages [Castle DynamicProxy](https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-introduction.md) to provide the run-time code generation.
21
+
Whenever compile-time proxy generation is not available (i.e. Visual Basic or C# versions before 9.0), install the `Stunts.DynamicProxy` package instead, which leverages [Castle DynamicProxy](https://github.com/castleproject/Core/blob/master/docs/dynamicproxy-introduction.md) to provide the run-time code generation.
22
22
23
23
The client API for configuring proxy behaviors in either case is exactly the same.
24
24
@@ -87,17 +87,17 @@ As you can see, the Stunts API itself uses the same extensibility mechanism that
87
87
88
88
### Static vs Dynamic Stunts
89
89
90
-
Depending on the project and platform, Stunts will automatically choose whether to use run-time proxies or compile-time ones (powered by Roslyn source generators). The latter are only supported when building C# 9.0+ projects.
90
+
By default, Stunts generates proxies at compile-time (powered by Roslyn source generators), which is only supported when building C# 9.0+ projects.
91
91
92
-
You can opt out of the static stunts by setting `EnableCompileTimeStunts=false` in your project file:
92
+
Whenever compile-time stunts are not supported (or not wanted), install the `Stunts.DynamicProxy` package, which switches the project to run-time proxies based on Castle.Core:
This will switch the project to run-time proxies based on Castle.Core.
100
+
The package sets `EnableCompileTimeStunts=false` for you. Projects that can't use compile-time stunts and don't reference `Stunts.DynamicProxy` get a build warning (`ST011`).
0 commit comments