public static ShelveBase CreateShelve(TypeShelves type) { if (!Factory.ContainsKey(type)) { throw new ArgumentOutOfRangeException("typeShelves not existing"); } Func <int, int> f = ShelvesFactory.Fois2; Func <int, int> f2 = n => n * 2; return(Factory[type]()); }
public ShelveBase(TypeShelves type) { Type = type; }