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
DoD: a new type, DelegateInterceptor, should exist. Its purpose is to allow the consumer to specify some, none, or all actions to take during the process of an interception. Similar to an event handling system, "handlers" for each major step should be used if provided; default handlers should be no-ops or equivalent logic should be used. In addition to allowing injectable actions to be taken during the process, an opt-out predicate should be injectable and should be used to determine whether interception should proceed using the delegated path, or if it should switch to plain-old-proxy mode. Once done, code like the following is possible:
where all use of types proxied with interceptor will have their method calls for all methods having names that start with "Send" logged according to the logic within LogMemberAccess.
Assumptions are:
LoggingInterceptor should be able to inherit from this new type and reuse some of the code there.
IoC registrations should still be possible wherein a singleton instance or factory is registered for an interceptor type, and component registrations can refer to the right interceptor registrations. This may already be the case with InterceptedBy(typeof(SomeInterceptor)) etc but hasn't been properly verified.
The text was updated successfully, but these errors were encountered:
* Added new DelegateInterceptor
* Changed LoggingInterceptor to inherit from DelegateInterceptor
* Updated test assertions to expect only one trace call for trapped error
execution paths
* Updated ReSharper settings for "implicit scope closure"
DoD: a new type,
DelegateInterceptor
, should exist. Its purpose is to allow the consumer to specify some, none, or all actions to take during the process of an interception. Similar to an event handling system, "handlers" for each major step should be used if provided; default handlers should be no-ops or equivalent logic should be used. In addition to allowing injectable actions to be taken during the process, an opt-out predicate should be injectable and should be used to determine whether interception should proceed using the delegated path, or if it should switch to plain-old-proxy mode. Once done, code like the following is possible:where all use of types proxied with
interceptor
will have their method calls for all methods having names that start with "Send" logged according to the logic withinLogMemberAccess
.Assumptions are:
InterceptedBy(typeof(SomeInterceptor))
etc but hasn't been properly verified.The text was updated successfully, but these errors were encountered: