Skip to content

Conversation

safesparrow
Copy link

@safesparrow safesparrow commented Mar 11, 2023

Description

instance parameter in the IMethodDecorator.Init method is currently null for constructor calls.
As described in #71 , it can be useful to have a reference to the instance.

The solution

The PR provides the instance reference for constructors. Now the only time the reference is not provided is for static members.

One caveat with this is that the object is only fully initialized after the constructor has finished, so providing the reference could cause issues if it's used for operations that require a fully initialized object.

Maybe this should be configurable by the user and disabled by default?

Todos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant