moq icon indicating copy to clipboard operation
moq copied to clipboard

Support Static Abstract property

Open htcfreek opened this issue 2 years ago • 11 comments

I need support for static abstract properties in non-static interfaces. (New in .Net 7.)

If I setup such an interface it fails because the property is missing.

Btw. I don't need to acces this property in my test code.

Back this issue Back this issue

htcfreek avatar Aug 14 '23 08:08 htcfreek

Hi @htcfreek. This capability first needs to be implemented in Castle DynamicProxy (the interceptor library that Moq is built upon) before it can be supported in Moq. There's already an issue for that over at their repository: https://github.com/castleproject/Core/issues/447.

stakx avatar Aug 14 '23 09:08 stakx

Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.

github-actions[bot] avatar Aug 24 '24 20:08 github-actions[bot]

@stakx This is still not fixed/implemented. Correct?

htcfreek avatar Aug 24 '24 21:08 htcfreek

@htcfreek, I wouldn't know (but I suspect it isn't), I stopped being a project maintainer and I stopped tracking this project due to the SponsorLink disaster.

stakx avatar Aug 25 '24 01:08 stakx

It seems once Castle.Core ships an update with that support, things should Just Work (or very close to that).

Feel free to back this issue if it's important for your use cases, to help prioritize work. Thanks.

kzu avatar Sep 03 '24 01:09 kzu

@stakx Any updates on this?

htcfreek avatar Nov 12 '24 22:11 htcfreek

@htcfreek, sorry, but I can no longer help you. I stopped maintaining and contributing to Moq last year, when kzu introduced SponsorLink, a move that I strongly disagreed with. (Search the closed issues from around August 2023 to learn more about that.)

On DynamicProxy's side, there isn't any support for static abstract type members yet, either. I was going to try and tackle this and other pending feature requests, but unfortunately the project (castleproject/Core) is currently stalled due to its principal maintainer being absent from GitHub. So I suspect this isn't going to happen anytime soon.

stakx avatar Nov 13 '24 00:11 stakx

Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.

github-actions[bot] avatar May 12 '25 01:05 github-actions[bot]

@github-actions, please keep open. This is not fixed.

htcfreek avatar May 12 '25 01:05 htcfreek