public static string Emit(GenContext context, GenSpec spec) { var sb = new StringBuilder(); var emitter = Emitters.First(e => e.CanEmit(spec.GetType())); foreach (var block in emitter.Emit(context, spec)) { sb.AppendLine(block); } return(sb.ToString()); }
IEnumerable <string> IGenEmitter.Emit(GenContext context, GenSpec spec) => Emit(context, (T)spec);