Hi all,
I'm new here, so I'm sorry if I'm not following the forum rules.

Anyway, I've been searching for a while on Reflector.CodeModel.IHasIlOffset, but neither this forum nor Google presented me any result.

My problem is that I need to implement that interface in my code, and I don't know:
1) What is it all about?
2) Why should I use it (.NET compiler told me to do so)?
3) I know I just have to implement the following properties:
int IlOffset { get; set; }
int StartIlOffset { get; }
But I don't know what should be inside the get and set code for the correct implementation...
Does anyone have an idea on how to implement this interface?

Thank you very much!
Best Regards to all of you!
nunooliveira
0

Comments

2 comments

  • Clive Tong
    Hi.

    Does this mean you are defining your own types of node inside the code model?

    The interface and associated properties are used for tracking the IL offsets of the items in the code model; this information is used in Reflector Pro for generating pdb files. Returning -1 from both getters and ignoring calls into the setter should be sufficient.
    Clive Tong
    0
  • nunooliveira
    Hi Clive

    Yes, it seems that I'm defining my own types... well I'm not sure because the project is not originally mine, I'm just improving it with new features. So the Reflector part was not done by me. And actually I don't really know what these types are for, so far.

    I defined private variables that store the value of the properties and then applied them to the body of the getters and setters...
    Well it just worked!

    Thanks for enlightening me about what for we use these IlOffSets.


    Best Regards
    nunooliveira
    0

Add comment

Please sign in to leave a comment.