public static IOperable <T> WithConstructor <T>(this IOperable <T> operable, Func <T> constructor) { return(operable.WithFactory(constructor)); //var declaration = GetDeclaration(operable); //declaration.ObjectBuilder.WithConstructor(constructor); //return (IOperable<T>)declaration; }
public static IOperable <T> WithConstructor <T>(this IOperable <T> operable, Func <int, T> constructor) { return(operable.WithFactory(constructor)); }