addabis
MCMetalama Community
•Created by domsinclair on 6/23/2023 in #technical-questions
Follow up question from yesterday's meetup
Aside from the limitation with enumerables, I think it would be quite common to arrive at the exactly same template code, i.e. you would specify the same template, which would be equivalent to specifying only the default template.
I think it might be a best practice to always test the async and enumerable scenarios as long as you allow the usage.
5 replies
MCMetalama Community
•Created by domsinclair on 6/23/2023 in #technical-questions
Follow up question from yesterday's meetup
I think in general you should always consider whether what your advice does is possible using a "normal" method template and whether the result of using such universal template has satisfactory results.
Specifically for IEnumerable - currently we are running into a limitation, where the "normal" template will always cause the ".Buffer()" call to be generated when targeting IEnumerable (and similar). This happens even when the template does not do anything with the return value. I think this is something we can improve.
5 replies
MCMetalama Community
•Created by domsinclair on 6/2/2023 in #technical-questions
Eligibility MustNotHaveAspectOfType
Filed an enhancement for this.
6 replies
MCMetalama Community
•Created by domsinclair on 6/8/2023 in #technical-questions
AddAspect Refactoring
I have filed a bug.
13 replies
MCMetalama Community
•Created by domsinclair on 6/5/2023 in #technical-questions
Testing Fabrics
But the target code (the transformed code you are testing aspects on) always needs to be a part of the test file and cannot be shared between tests.
14 replies
MCMetalama Community
•Created by domsinclair on 6/5/2023 in #technical-questions
Testing Fabrics
If you need to share code between test cases, you might want to have a look at the "Include other files" section.
14 replies
MCMetalama Community
•Created by domsinclair on 6/5/2023 in #technical-questions
Testing Fabrics
My suggestion was intended only for the cross assembly scenario, i.e. when it is relevant that your fabric is being inherited in another project than the one in which it was applied.
14 replies
MCMetalama Community
•Created by domsinclair on 6/5/2023 in #technical-questions
Testing Fabrics
I don't think it's used in public repos at the moment. I'm mentioning that since it's rather a small note in https://doc.metalama.net/conceptual/aspects/testing/aspect-testing under "Creating a dependent project". We use that quite extensively though.
14 replies
MCMetalama Community
•Created by domsinclair on 6/5/2023 in #technical-questions
Testing Fabrics
If you'd like to test that the fabric correctly works across projects, you can use the
<Test>.Dependency.cs
which causes the test runner to create two projects - the first project that includes <Test>.cs
and references the second project which contains <Test>.Dependency.cs
.14 replies