A generic Re-usable C# Property Parser utility [on hold]
- by Shyam K Pananghat
This is about a utility i have happened to write which can parse through the properties of a data contracts at runtime using reflection. The input required is a look like XPath string. since this is using reflection, you dont have to add the reference to any of your data contracts thus making pure generic and re- usable.. you can read about this and get the full c# sourcecode here. Property-Parser-A-C-utility-to-retrieve-values-from-any-Net-Data-contracts-at-runtime
Now about the doubts which i have about this utility. i am using this utility enormously i many places of my code
I am using Regex repeatedly inside a recursion method. does this
affect the memmory usage or GC collection badly ?do i have to
dispose this manually. if yes how ?.
The statements like obj.GetType().GetProperty() and
obj.GetType().GetField() returns .net "object" which makes difficult
or imposible to introduce generics here. Does this cause to have any
overheads like boxing ?
on an overall, please suggest to make this utility performance efficient and more light weight on memmory