MF Mapping Framework – Beta release

Mapping Framework256Hi folks, since a long time I have to publish this project and I finally got the time to release a beta version of it. The purpose of this project is to provide a simple framework component to easily map object from different types. A simple example is given just below. For now the project is still in pre beta version, unit tests are not yet published and documentation is not published too. But this little piece of code is really easy to use and really easy to understand.

The project is actually hosted on codeplex and available at this address :

Here’s a simple example of the mapping framework usage.

 class Program
        static void Main(string[] args)
            // Initialize the mappers with the given assemblies in the app.config
            // They will be inspected and their dependencies too. (configurable)

            // Just check if TestMapper is registred in the mapper service
            bool isMapperRegistred = MapperService.Instance.IsMapperExisting(new MappingTuple(typeof(int), typeof(string)));
            string mappingResult = String.Empty;

            // If he's registred, try to map an integer to a string which is the mapping implemented by TestMapper
                mappingResult = MapperService.Instance.Map<int, string>(10);

            // Display the result (and cross the fingers)
            Console.WriteLine("Mapper registred : {0}{1}{2}", isMapperRegistred, Environment.NewLine, mappingResult);


    /// <summary>
    /// Convert integer to string
    /// </summary>
    [TypeMapper(typeof(int), typeof(string))]
    public class TestMapper : IMapper
        public object Map(object source)
            int sourceObject = (int)source;
            return sourceObject.ToString();

Project link :

Published by Emmanuel Istace

Musician, Software developer and guitar instructor.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: