using System.Collections.Generic;
Dictionary<Func<string,bool>,Func<ICreate>> _map = new Dictionary<Func<string,bool>, Func<ICreate>>
a => a.Contains("classA"),
a => a.Contains("classB"),
a => a.Contains("classC"),
public ICreate Create(string toMatch)
var func = _map.Where( e => e.Key(toMatch) ).First().Value;
static public void Main()
var o = f.Create(@"c:\folder\subfolder\classA");
Console.WriteLine("You just created an instance of '{0}'.", o.GetType().Name);