-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help] I can't use Castle for proxy internal class #686
Comments
You'd be better off asking plain usage questions on places such as Stack Overflow; this GitHub issue tracker focuses on the development of this library. Even if this were a bug, your code example is incomplete – you've not included the relevant method of the proxied type. All of that being said, I'm assuming the problem here might be a missing |
If I had access to change the library, I would have directly inherited the class itself and override it.
What's the relevant method of the proxied type? I asked Chat GPT to help me with my problem and it suggested the code similar to above |
The "relevant method of the proxied type" is the one you are interested in. (I'm guessing |
Do you need full code of View.OnDisplay? |
Anyhow, we can leave this issue open for a while, in case someone else wants to chime in and offer help; otherwise I'll close it in a few weeks or so. |
Ok, thanks for your reply. In case you asked is the method virtual or abstract, it's virtual.
|
No, not necessarily. If you seek help online, you should show just enough of your code such that it can be compiled and executed successfully while still exhibiting the problem that you're asking about... don't just drop all of your code without making any attempt to remove all irrelevant bits first... do try to come up with a minimal repro. (The Stack Overflow community used to call that a minimally complete and verifiable code example.) |
Hi. I have an internal class in another assemly.
I want to override it's
protected override void OnDisplay()
, but, for some reason my code doesn't work.Here's my code
Before OnDisplay
is printed, butinvocation.Proceed
doesn't work. It gives null reference. Do you know in where I wrote wrong?The text was updated successfully, but these errors were encountered: