Click here to Skip to main content
15,885,366 members
Articles / Programming Languages / C#

TypeBuilderLib, a Library to Build Dynamic Types Easily

Rate me:
Please Sign up or sign in to vote.
4.94/5 (13 votes)
23 Feb 2007CPOL11 min read 43.9K   242   41  
TypeBuilderLib allows you to create dynamic types on the fly, which can increase the productivity of developers and the performance of applications.
using System;
using System.Data;

namespace TypeBuilderLib.Buffering
{
	/// <summary>Base class for buffering adapters.</summary>
	/// <remarks>This class is typically derived by dynamically emitted classes.</remarks>
	/// <typeparam name="I"></typeparam>
	public abstract class BufferingAdapterBase<I> where I : class
	{
		/// <summary>Buffers a given instance.</summary>
		/// <param name="buffered"></param>
		public void Buffer(I buffered)
		{
			BufferCopy(buffered);
		}

		/// <summary>Implemented by emitted class.</summary>
		/// <remarks>Must perform the copy into emitted fields.</remarks>
		/// <param name="buffered"></param>
		protected abstract void BufferCopy(I buffered);
	}
}

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 Code Project Open License (CPOL)


Written By
Architect CGI
Canada Canada
Vincent-Philippe is a Senior Solution Architect working in Montreal (Quebec, Canada).

His main interests are Windows Azure, .NET Enterprise suite (e.g. SharePoint 2013, Biztalk Server 2010) & the new .NET 4.5 platforms.

Comments and Discussions