Company C =NewCompany (); List<PropertyInfo> PS =C.gettype (). GetProperties (). ToList (); varPName = PS. First (x = X.name = ="Name"); Iobjectwrapper Owcomp=NewObjectwrapper (c); //setting the company name ...PName. SetValue (c,"134"); Owcomp.setpropertyvalue ("Name","Kexb."); //can also be do like this ...PropertyValue v =NewPropertyValue ("name","Salina Inc1."); Owcomp.setpropertyvalue (v); //OK, let's create the director and bind it to the company ...Employee Don =NewEmployee (); Iobjectwrapper Owdon=NewObjectwrapper (Don); Owdon.setpropertyvalue ("Salary", About); Owdon.setpropertyvalue ("name","Don Fabrizio"); Owcomp.setpropertyvalue ("Managingdirector", Don); //retrieving the salary of the Managingdirector through the company floatSalary = (float) Owcomp.getpropertyvalue ("managingdirector.salary");
Spring.net Objectwrapper Object Packaging (reflection mechanism) a little clear and convenient