Skip to content

Exception during Context constructor #2937

Answered by nils-a
nathangiuliani asked this question in Q&A
Discussion options

You must be logged in to vote

Generally setup should be done in a IFrostingLifetime.Setup.

Somthing like

public sealed class Lifetime : FrostingLifetime<Context>
{
    public override void Setup(Context context)
    {
        context.Information("Setting things up...");
        // here goes the setup..
    }

    public override void Teardown(Context context, ITeardownContext info)
    {
        context.Information("Tearing things down...");
    }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pascalberger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants