Click here to Skip to main content
Click here to Skip to main content
Go to top

Fastest XML Serialization and Reflection Library

, 23 Mar 2012
Rate this:
Please Sign up or sign in to vote.

http://xmlserializer.codeplex.com/

The article and examples are in the zip file.

  Download TNTTools.zip - 2.7 MB

 

 

Quick Usage example:

r

Reflection

           ReflectionPropertyCache cache = new ReflectionPropertyCache();
           ObjectInfo carInfo = cache.GetCachedObjectInfo(mycar, mycar.GetType());
           carInfo.propertyInfo[0].setter.dateTimeSetter(mycar, DateTime.Now);
 

Serialization

  /// <summary>
       /// Serialization Example - Simple objects
       /// </summary>
       /// <param name="sender"></param>
       /// <param name="e"></param>
       private void Example1Serialization()
       {
           
            IPodConnector connector = new IPodConnector() { Version = "1.1a" };
                Screen screen = new Screen() { Size = "4 inch" };
                Stereo stereo = new Stereo() { Make = "alpine", Watts = "1000", };
                Car mycar = new Car() { brake = "5 piston", wheel = "22", Stereo = stereo, IPodConnector    =    connector };
 
        // Basic serialization example, raw with no attributes.
                StringBuilder XML1 = SerializerFacade.SerializeBasic(mycar);
                Car entityFromXml = SerializerFacade.Deserialize<Car>(XML1.ToString());
         }

Performance

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

rj45
Software Developer (Senior)
Canada Canada
No Biography provided

Comments and Discussions

 
BugBug in your performance measuring code - serialization is fast but not as fast as shown Pinmemberhaindl23-Mar-12 1:23 
GeneralRe: Bug in your performance measuring code - serialization is fast but not as fast as shown Pinmemberrj4523-Mar-12 5:02 
QuestionArticle? PinmemberJustin Helsley22-Mar-12 8:26 
AnswerRe: Article? Pinmemberrj4522-Mar-12 8:44 
QuestionExpected more PinmvpMehdi Gholam22-Mar-12 6:03 
AnswerRe: Expected more Pinmemberrj4522-Mar-12 8:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 23 Mar 2012
Article Copyright 2012 by rj45
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid