-
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.
introduce InterfaceInterceptor{TInterface, TTarget} class
- Loading branch information
Showing
10 changed files
with
68 additions
and
24 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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/******************************************************************************** | ||
* InterfaceInterceptor{TInterface}r.cs * | ||
* * | ||
* Author: Denes Solti * | ||
********************************************************************************/ | ||
|
||
namespace Solti.Utils.Proxy | ||
{ | ||
/// <summary> | ||
/// Provides the mechanism for intercepting interface method calls. | ||
/// </summary> | ||
/// <typeparam name="TInterface">The interface to be intercepted.</typeparam> | ||
public class InterfaceInterceptor<TInterface> : InterfaceInterceptor<TInterface, TInterface> where TInterface : class | ||
{ | ||
/// <summary> | ||
/// Creates a new <see cref="InterfaceInterceptor{TInterface}"/> instance against the given <paramref name="target"/>. | ||
/// </summary> | ||
/// <param name="target">The target of this interceptor.</param> | ||
public InterfaceInterceptor(TInterface? target): base(target) { } | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget> | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.InterfaceInterceptor(TTarget? target) -> void | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.Proxy.set -> void | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.Target.get -> TTarget? | ||
virtual Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.Invoke(Solti.Utils.Proxy.InvocationContext! context) -> object? |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget> | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.InterfaceInterceptor(TTarget? target) -> void | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.Proxy.set -> void | ||
Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.Target.get -> TTarget? | ||
virtual Solti.Utils.Proxy.InterfaceInterceptor<TInterface, TTarget>.Invoke(Solti.Utils.Proxy.InvocationContext! context) -> object? |