Click here to Skip to main content
15,886,873 members
Articles / Programming Languages / C#

A Fast/Compact Serialization Framework

Rate me:
Please Sign up or sign in to vote.
4.85/5 (37 votes)
13 Oct 2010GPL35 min read 282K   1.2K   175  
A framework for object serializiation/deserialization that is many times faster and yields a compact output.
/*

OpenNxSerialization Framework
Copyright (C) 2006 - 2008 "NeXtreme Innovations"
[The Next Xtreme in ingenuity]

This program is free software, distributed under the terms of
the GNU General Public License Version 2. See the License file
at the top of the source tree.

*/
using System;
using System.Data;

using NeXtreme.OpenNxSerialization.IO;

namespace NeXtreme.OpenNxSerialization.Surrogates
{
    /// <summary>
    /// Surrogate for generic <see cref="System.Data.DataSet"/> types.
    /// </summary>
    sealed class NxDataSetSerializationSurrogate : NxSerializationSurrogate, INxBuiltinSerializationSurrogate
    {
        public NxDataSetSerializationSurrogate() : base(typeof(DataSet)) { }

        public override object Instantiate(INxBinaryReader reader)
        {
            throw new NotImplementedException();
        }

        public override object ReadDirect(INxBinaryReader reader, object graph)
        {
            throw new NotImplementedException();
        }

        public override void WriteDirect(INxBinaryWriter writer, object graph)
        {
            throw new NotImplementedException();
        }
    }

    /// <summary>
    /// Surrogate for generic <see cref="System.Data.DataTable"/> types.
    /// </summary>
    sealed class NxDataTableSerializationSurrogate : NxSerializationSurrogate, INxBuiltinSerializationSurrogate
    {
        public NxDataTableSerializationSurrogate() : base(typeof(DataTable)) { }

        public override object Instantiate(INxBinaryReader reader)
        {
            throw new NotImplementedException();
        }

        public override object ReadDirect(INxBinaryReader reader, object graph)
        {
            throw new NotImplementedException();
        }

        public override void WriteDirect(INxBinaryWriter writer, object graph)
        {
            throw new NotImplementedException();
        }
    }

    /// <summary>
    /// Surrogate for generic <see cref="System.Data.DataRow"/> types.
    /// </summary>
    sealed class NxDataRowSerializationSurrogate : NxSerializationSurrogate, INxBuiltinSerializationSurrogate
    {
        public NxDataRowSerializationSurrogate() : base(typeof(DataRow)) { }

        public override object Instantiate(INxBinaryReader reader)
        {
            throw new NotImplementedException();
        }

        public override object ReadDirect(INxBinaryReader reader, object graph)
        {
            throw new NotImplementedException();
        }

        public override void WriteDirect(INxBinaryWriter writer, object graph)
        {
            throw new NotImplementedException();
        }
    }

    /// <summary>
    /// Surrogate for generic <see cref="System.Data.DataColumn"/> types.
    /// </summary>
    sealed class NxDataColumnSerializationSurrogate : NxSerializationSurrogate, INxBuiltinSerializationSurrogate
    {
        public NxDataColumnSerializationSurrogate() : base(typeof(DataColumn)) { }

        public override object Instantiate(INxBinaryReader reader)
        {
            throw new NotImplementedException();
        }

        public override object ReadDirect(INxBinaryReader reader, object graph)
        {
            throw new NotImplementedException();
        }

        public override void WriteDirect(INxBinaryWriter writer, object graph)
        {
            throw new NotImplementedException();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Architect
Pakistan Pakistan
Let a = b ....... (1)
a - b = a - b
a^2 - ab = a^2 - ab
a^2 - ab = a^2 - b^2 (from 1)
a (a - b) = (a + b) (a - b)
a = (a + b) ...... (2)

if a = 1
1 = (1 + 1) (from 1 & 2)
1 = 2 !!

Comments and Discussions