public TypeScriptGenerator([NotNull] TypeScriptGenerationOptions options, [NotNull] ICustomTypeGenerator customTypeGenerator, [NotNull] IRootTypesProvider rootTypesProvider) { Options = options ?? throw new ArgumentNullException(nameof(options)); this.customTypeGenerator = customTypeGenerator ?? throw new ArgumentNullException(nameof(customTypeGenerator)); rootTypes = rootTypesProvider?.GetRootTypes() ?? throw new ArgumentNullException(nameof(rootTypesProvider)); typeUnitFactory = new DefaultTypeScriptGeneratorOutput(); typeDeclarations = new Dictionary <TypeDeclarationKey, ITypeBuildingContext>(); }
public TypeScriptGenerator(TypeScriptGenerationOptions options, ICustomTypeGenerator customTypeGenerator, IRootTypesProvider typesProvider, ITypeInfo[] types = null) { Options = options ?? throw new ArgumentNullException(nameof(options)); TypesProvider = typesProvider ?? throw new ArgumentNullException(nameof(typesProvider)); this.customTypeGenerator = customTypeGenerator ?? throw new ArgumentNullException(nameof(customTypeGenerator)); rootTypes = typesProvider?.GetRootTypes() ?? throw new ArgumentNullException(nameof(typesProvider)); typeUnitFactory = new DefaultTypeScriptGeneratorOutput(); typeDeclarations = new Dictionary <ITypeInfo, ITypeBuildingContext>(); }