Say I have an xml file like:
<Filters>
<Blur Name="Blur01" />
<Sharpen Name="Sharpen01" Amount=5 />
</Filters>
How do I set the properties of Blur
, Sharpen
, etc without a performance hit? I thought reflection would work, but the number of nodes and properties will be in millions, so the reflection cost would be very high IMO.
So say I get a list of properties like:
{ "Name", "Amount", ... }
How do I call them on an already initialized object?
I also have the option to pass them to optional arguments as I will be constructing the objects from the xml at the time of reading it.