lundi 17 avril 2017

UWP. Reflection. Order properties in deterministic manner

I am porting a Silverlight app to UWP Windows 10. There is a method which relies on getting properties of a type and ordering them by MetadataToken (which makes it deterministic - proven from years use).

In UWP it seems MetadataToken is missing. I need to order properties somehow that if in the single app run the same type will give the same order of properties (I don't need to keep it persistent or anything).

P.S. I cannot use attributes on the properties as the classes it works with - are EntityObjects and there few thousands properties between them plus - 99% of them are generated through service ref proxy.





Aucun commentaire:

Enregistrer un commentaire