Free key is not recognized?
Trying to override a method and pass an enum
How to inject factory-based dependencies from method aspect into type?
IntroduceDependency with record types
Giving Aspects Metadata ?
Unable to get aspect testing to work
How to debug a "Cannot preview the transformed code: unknown error"?
Warn on ineligibility instead of throwing
Referencing value assigned to variable in statement builder within another statement
Specifying generic constraints of compile-time introduced type
Type
and is sprinkled liberally through my resulting compiled target. Since generic typed aspects aren't yet supported (https://github.com/postsharp/Metalama/issues/199) and one cannot limit eligibility based on instance members (such as this Type - https://github.com/postsharp/Metalama/issues/198), I'm at a loss as to how I can specify the generic constraints of this type (must implement IEquatable<>
) at compile-time otherwise.
Any ideas? Thanks!...Step-through aspect-debugging
Given an aspect, is it possible to step through my code (e.g. see the while Metalama is building the compile-time code? I'm trying to determine if a given type implements an IEnumerable, and if so, what the generic argument is for this IEnumerable, but I can't figure out how to peek inside it while debugging (Debugger.Break never hits) to see what precisely is happening. ```cs...
CodeLens Help
How to apply an attribute to a method introduced by another aspect?
Advising the addition of code comments
Set eligibility to not run against (built-in) methods of record classes or structs
If
statement for the record types, but I cannot figure out how to end it - how can I ensure my OverrideMethodAspect doesn't actually apply to any methods that are attached to a record? Even better though - is there any way to have it not apply to any methods that aren't automatically a part of a record (e.g. don't apply to ToString or Equals, but do apply to MyCustomMethod without specifically calling such custom methods out)?
Thanks!...How to specify an IMethod as the callback for an event?
Create NuGet with Metalama
BusinessException
, and then apply an attribute/aspect to it, generating code.
Then I'll publish a NuGet to nuget.org, and when I create it (dotnet build & pack), I'll pass the license key with an envinroment variable to MSBuild....Override property with BuildAspect
[BusinessException]
attribute.
I want to override the Message property using string.Format with the primary constructor parameters. For example, the next class:
```...View diff in Rider