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);
        }
Пример #2
0
 public Generator(GenOptions options, ILanguageService service)
 {
     _options         = options;
     _languageService = service;
 }
Пример #3
0
 public Generator(GenOptions options)
 {
     _options         = options;
     _languageService = LanguageServiceFactory.Create(options);
 }
Пример #4
0
 public TSLanguageService(GenOptions options)
 {
     _options = options;
 }