Interface ILoggingWrapper
Wraps service instances in an interface proxy that logs methods marked with LogAttribute. Plugins receive this type (never the sink ILogger) and call Wrap<T>(T) when creating children.
Namespace: Zaya.Logging.Services
Assembly: Zaya.Logging.dll
Syntax
public interface ILoggingWrapper
Methods
| Edit this page View SourceWrap<T>(Func<ILoggingWrapper, T>)
Creates an instance via factory (passing this wrapper) and wraps the result.
Declaration
T Wrap<T>(Func<ILoggingWrapper, T> factory) where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| Func<ILoggingWrapper, T> | factory | Factory that receives this wrapper and returns the implementation. |
Returns
| Type | Description |
|---|---|
| T | Wrapped instance. |
Type Parameters
| Name | Description |
|---|---|
| T | Service interface type. |
Wrap<T>(T)
Wraps instance so that implementation methods marked with LogAttribute
are logged when invoked through T.
Declaration
T Wrap<T>(T instance) where T : class
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | Implementation instance. |
Returns
| Type | Description |
|---|---|
| T | Proxy implementing |
Type Parameters
| Name | Description |
|---|---|
| T | Service interface type. |