Hi,

It seems that part of logic that is responsible for this(PropertyDefinition
lookup by token) functionality has been forgotten to be implemented:
The only method that uses ReflectionReader.m_properties field is
ReflectionReader.GetPropertyDefAt; and there is no
ReflectionReader.ReadProperties() method defined like in
AggressiveReflectionReader...

This results in exception in following code snippet:

Expression<Func<DateTime>> stringTrueRepresentation = () => DateTime.Now;
var token =
((MemberExpression)stringTrueRepresentation.Body).Member.MetadataToken;
var assemblyDef =
AssemblyFactory.GetAssembly(typeof(DateTime).Assembly.Location);
var propDef = assemblyDef.MainModule.LookupByToken(new
Mono.Cecil.Metadata.MetadataToken(token));

For the reference: I am using trunk version of Cecil..

Best Regards, Sergiy
-- 
View this message in context: 
http://www.nabble.com/Property-lookup-by-token-issue-tp24730645p24730645.html
Sent from the Mono - Cecil mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to