MC
Metalama CommunityWiredWizard
Trying to override a method and pass an enum
I'm trying to create an OverrideMethodAspect to transform a method. I want to pass an enum value into the aspect attribute, but I get an error complaining about the enum being runtime and the aspect being compile time. What is the best way to accomplish this? I'm trying to decorate my methods with something like [ParserRule(SyntaxNodeType.Expression)].
Petr Onderka•179d ago
Hi, we prefer using Slack now, see https://discord.com/channels/1108042639565127740/1108407291209842838/1164523200231772190.
Coincidentally (?), somebody just asked a very similar question there, I think that should answer your question: https://metalama.slack.com/archives/C03Q89ZGAQJ/p1700560350125159?thread_ts=1700514869.690389&cid=C03Q89ZGAQJ.
Discord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
WiredWizard•179d ago
Ah thank you, I will jump over there.
Want results from more Discord servers?
More PostsHow to inject factory-based dependencies from method aspect into type?Let's use an example - in Microsoft.Extensions.Logging, I might register an ILoggerFactory so I can IntroduceDependency with record typesThe IntroduceDependencyAttribute used within the SimpleLogAttribute to inject an ILogger _logger isnGiving Aspects Metadata ?I've only just started messing with MetaLama and going thru the documentation and videos but I was wUnable to get aspect testing to workI've got a very simple class set up to apply a logging aspect to so I can get the hang down of testiHow to debug a "Cannot preview the transformed code: unknown error"?I've got an aspect that's building without error and a target project that's applying the aspect thaWarn on ineligibility instead of throwingI've got two conditions in my BuildEligibility for a method override aspect: If the target type is a