public static ILanguageService Create(GenOptions options) { ILanguageService provider; switch (options.Language) { case Language.TypeScript: provider = new TSLanguageService(options); break; default: throw new ArgumentException("Invalid language", nameof(options.Language)); } return(provider); }
public Generator(GenOptions options, ILanguageService service) { _options = options; _languageService = service; }
public Generator(GenOptions options) { _options = options; _languageService = LanguageServiceFactory.Create(options); }
public TSLanguageService(GenOptions options) { _options = options; }