문제

I have used Reflection.Emit to dynamically generate some types and methods. Everything works fine, but I want to include some descriptive information with the method so that others can use it more easily. You would normall do this by including this above the method:

    /// <summary>
    /// This is my descriptive information
    /// </summary>
    /// <param name="paramName1">paramName1 description</param>
    /// <param name="paramName2">paramName2 description</param>
    /// <param name="glTypeFieldReference"></param>
    /// <returns>Information about the return type</returns>

Is it possible to include this information with Reflection.Emit, and if so, how?

도움이 되었습니까?

해결책

No, because that is not part of the IL metadata. Instead, the compiler writes that into the optional .xml file that goes alongside the dll, and TypeBuilder etc doesn't handle those in any way. You could of course write the xml file separately - the schema should be available somewhere.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top