Skip to content

Start Method Message #507

Closed
Closed
@RichardReukemaOptimus

Description

@RichardReukemaOptimus

I would like to have a message at the start of the method, as method start, other async methods execute, and it causes confusion in the call train.

I tried to update the AsyncMethodProcessor within the InjectStopWatchStart - after a couple of hours understanding the flow....

I tried to add these two lines (for what its worth)
//todo: write method start time message
Instruction.Create(OpCodes.Ldstr, string.Concat(Method.FullName,"-Start") ),
Instruction.Create(OpCodes.Call, ModuleWeaver.TraceWriteLineMethod)

but after I compiled, and incorporated in to my solution - it seems that I broke the entire Nuget package. I'm not looking for someone to do the work for me, but I would like to know If I'm on the right track, and how to incorporate a new version into my project without loosing all reference resolution to the Time attribute.

I also tried adding this constructuor on the time attribute:
using a optional parameter to avoid a change in parameter or method signature:

public TimeAttribute(string format, bool WriteStartMessage = false)
{
}

but i didn't get as far in understanding how the MethodTimer uses either of these CTOR....

I'm new to Fody, but aware of what IL weaving, just never really got into it.

Regards
RIchard

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions