public GenericTypeTranslationContext( IDiscoveredTypeRegistrator discoveredTypeRegistrator, ITranslatedTypeMetadataFactory translatedTypeMetadataFactory, ISourceTypeMetadataFactory sourceTypeMetadataFactory, ITranslationContext translationContext, ISkipTypeRule skipTypeRule, ITypeScriptExpression expression, ISymbolNamer symbolNamer, ICommenter commenter, TypeInfo typeInfo) { DiscoveredTypeRegistrator = discoveredTypeRegistrator.NullToException(new ArgumentNullException(nameof(discoveredTypeRegistrator))); TranslatedTypeMetadataFactory = translatedTypeMetadataFactory .NullToException(new ArgumentNullException(nameof(translatedTypeMetadataFactory))); TranslatedTypeMetadata = TranslatedTypeMetadataFactory.CreateNew(); SourceTypeMetadataFactory = sourceTypeMetadataFactory .NullToException(new ArgumentNullException(nameof(sourceTypeMetadataFactory))); SourceTypeMetadata = sourceTypeMetadataFactory.CreateNew(); TranslationContext = translationContext.NullToException(new ArgumentNullException(nameof(translationContext))); SkipTypeRule = skipTypeRule.NullToException(new ArgumentNullException(nameof(skipTypeRule))); Expression = expression.NullToException(new ArgumentNullException(nameof(expression))); SymbolNamer = symbolNamer.NullToException(new ArgumentNullException(nameof(symbolNamer))); Commenter = commenter.NullToException(new ArgumentNullException(nameof(commenter))); TypeInfo = typeInfo.NullToException(new ArgumentNullException(nameof(typeInfo))); }
public EnumTypeTranslationContext( ITranslatedTypeMetadataFactory translatedTypeMetadataFactory, ITranslationContext translationContext, ITypeScriptExpression expression, ISymbolNamer symbolNamer, ICommenter commenter) { TranslatedTypeMetadata = translatedTypeMetadataFactory .NullToException(new ArgumentNullException(nameof(translatedTypeMetadataFactory))) .CreateNew(); TranslationContext = translationContext.NullToException(new ArgumentNullException(nameof(translationContext))); Expression = expression.NullToException(new ArgumentNullException(nameof(expression))); SymbolNamer = symbolNamer.NullToException(new ArgumentNullException(nameof(symbolNamer))); Commenter = commenter.NullToException(new ArgumentNullException(nameof(commenter))); }