Skip to content
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

Implementation of AOP (Aspect Oriencted Programming) in C# #6558

Closed
niconico49 opened this issue Oct 18, 2022 · 2 comments
Closed

Implementation of AOP (Aspect Oriencted Programming) in C# #6558

niconico49 opened this issue Oct 18, 2022 · 2 comments

Comments

@niconico49
Copy link

niconico49 commented Oct 18, 2022

I don't know if is the right place for this suggestion/idea but is possible add in c# language code (and runtime too) something similar to aspectJ (aspect oriencted programming) in java? I know that is possible to do something similar thanks to the attributes but i think that is too expensive during runtime execution, because every code interrogation and analysis will be executed only during the execution thanks the reflections. Is better to do the same thing during the code compilation because the eventually AOP library (or possible c# future feature support) takes the pieces of code (kernel code and aspect code), join them and compile.
I know there are some libraries that emulate that too, but, from my point of view are too complicated if compared with the same feature realized for java programming. The question is: is possible to do the same (or more simple) natively for c#?
Thanks a lot and good programming.

@HaloFour
Copy link
Contributor

See: #107

And: https://www.postsharp.net/aop.net

Notably Java doesn't have any AOP features. AspectJ is entirely external and relies on rewriting the bytecode of the program either after compilation or at runtime via a Java agent.

@333fred
Copy link
Member

333fred commented Oct 18, 2022

Closing as a duplicate. In he future, please open new requests as discussions, not issues, as documented in our readme.

@333fred 333fred closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2022
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

No branches or pull requests

3 participants