Skip to content

Eligibility inquiry #342

Closed Answered by svick
WhitWaldo asked this question in Q&A
Jul 22, 2024 · 3 comments · 7 replies
Discussion options

You must be logged in to vote

When I built your solution, I got the following error:

InjectLoggerFactoryAttribute.cs(20,9,20,75): error LAMA0041: 'Exception of type 'System.InvalidOperationException' thrown while executing BuildEligibility for aspect 'InjectLoggerFactory': TypeFactory is not available in this context. In BuildEligibility, TypeFactory can only be used inside eligibility delegates. ...

Once I fixed that, by changing the method to the following, things started working.

public override void BuildEligibility(IEligibilityBuilder<IConstructor> builder)
{
    builder.MustSatisfyAll(
        //Must be explicitly declared
        _ => builder.MustBeExplicitlyDeclared(),
        //Must not be static
        _ =>

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@gfraiteur
Comment options

Comment options

You must be logged in to vote
1 reply
@WhitWaldo
Comment options

Comment options

You must be logged in to vote
5 replies
@WhitWaldo
Comment options

@WhitWaldo
Comment options

@svick
Comment options

Answer selected by WhitWaldo
@gfraiteur
Comment options

@WhitWaldo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants