private static TranslatedStatementContentDetails Translate( ITranslateIndividualStatements statementTranslator, Statement statement, ScopeAccessInformation scopeAccessInformation, ExpressionReturnTypeOptions returnRequirements, Action <string> warningLogger) { if (statementTranslator == null) { throw new ArgumentNullException("statementTranslator"); } if (statement == null) { throw new ArgumentNullException("statement"); } if (scopeAccessInformation == null) { throw new ArgumentNullException("scopeAccessInformation"); } if (!Enum.IsDefined(typeof(ExpressionReturnTypeOptions), returnRequirements)) { throw new ArgumentOutOfRangeException("returnRequirements"); } if (warningLogger == null) { throw new ArgumentNullException("warningLogger"); } return(statementTranslator.Translate( statement.ToStageTwoParserExpression(scopeAccessInformation, returnRequirements, warningLogger), scopeAccessInformation, returnRequirements )); }
public ForEachBlockTranslator( CSharpName supportRefName, CSharpName envClassName, CSharpName envRefName, CSharpName outerClassName, CSharpName outerRefName, VBScriptNameRewriter nameRewriter, TempValueNameGenerator tempNameGenerator, ITranslateIndividualStatements statementTranslator, ITranslateValueSettingsStatements valueSettingStatementTranslator, ILogInformation logger) : base(supportRefName, envClassName, envRefName, outerClassName, outerRefName, nameRewriter, tempNameGenerator, statementTranslator, valueSettingStatementTranslator, logger) { if (statementTranslator == null) { throw new ArgumentNullException("statementTranslator"); } if (logger == null) { throw new ArgumentNullException("logger"); } _statementTranslator = statementTranslator; _logger = logger; }
/// <summary> /// This will never return null, it will raise an exception if unable to satisfy the request (this includes the case of a null expression reference) /// </summary> public static TranslatedStatementContentDetails Translate( this ITranslateIndividualStatements statementTranslator, Expression expression, ScopeAccessInformation scopeAccessInformation, ExpressionReturnTypeOptions returnRequirements, Action <string> warningLogger) { if (statementTranslator == null) { throw new ArgumentNullException("statementTranslator"); } if (expression == null) { throw new ArgumentNullException("expression"); } if (scopeAccessInformation == null) { throw new ArgumentNullException("scopeAccessInformation"); } if (!Enum.IsDefined(typeof(ExpressionReturnTypeOptions), returnRequirements)) { throw new ArgumentOutOfRangeException("returnRequirements"); } if (warningLogger == null) { throw new ArgumentNullException("warningLogger"); } return(Translate(statementTranslator, (Statement)expression, scopeAccessInformation, returnRequirements, warningLogger)); }
/// <summary> /// This will never return null, it will raise an exception if unable to satisfy the request (this includes the case of a null statement reference) /// </summary> public static TranslatedStatementContentDetails Translate( this ITranslateIndividualStatements statementTranslator, Statement statement, ScopeAccessInformation scopeAccessInformation, Action <string> warningLogger) { if (statementTranslator == null) { throw new ArgumentNullException("statementTranslator"); } if (statement == null) { throw new ArgumentNullException("statement"); } if (scopeAccessInformation == null) { throw new ArgumentNullException("scopeAccessInformation"); } if (warningLogger == null) { throw new ArgumentNullException("warningLogger"); } return(Translate(statementTranslator, statement, scopeAccessInformation, ExpressionReturnTypeOptions.None, warningLogger)); }
public OuterScopeBlockTranslator( CSharpName startNamespace, CSharpName startClassName, CSharpName startMethodName, CSharpName runtimeDateLiteralValidatorClassName, CSharpName supportRefName, CSharpName envClassName, CSharpName envRefName, CSharpName outerClassName, CSharpName outerRefName, VBScriptNameRewriter nameRewriter, TempValueNameGenerator tempNameGenerator, ITranslateIndividualStatements statementTranslator, ITranslateValueSettingsStatements valueSettingStatementTranslator, NonNullImmutableList <NameToken> externalDependencies, OutputTypeOptions outputType, ILogInformation logger) : base(supportRefName, envClassName, envRefName, outerClassName, outerRefName, nameRewriter, tempNameGenerator, statementTranslator, valueSettingStatementTranslator, logger) { if (startNamespace == null) { throw new ArgumentNullException("startNamespace"); } if (startClassName == null) { throw new ArgumentNullException("startClassName"); } if (startMethodName == null) { throw new ArgumentNullException("startMethodName"); } if (runtimeDateLiteralValidatorClassName == null) { throw new ArgumentNullException("runtimeDateLiteralValidatorClassName"); } if (externalDependencies == null) { throw new ArgumentNullException("externalDependencies"); } if (!Enum.IsDefined(typeof(OutputTypeOptions), outputType)) { throw new ArgumentOutOfRangeException("outputType"); } if (logger == null) { throw new ArgumentNullException("logger"); } _startNamespace = startNamespace; _startClassName = startClassName; _startMethodName = startMethodName; _runtimeDateLiteralValidatorClassName = runtimeDateLiteralValidatorClassName; _externalDependencies = externalDependencies; _outputType = outputType; _logger = logger; }
public ClassBlockTranslator( CSharpName supportRefName, CSharpName envClassName, CSharpName envRefName, CSharpName outerClassName, CSharpName outerRefName, VBScriptNameRewriter nameRewriter, TempValueNameGenerator tempNameGenerator, ITranslateIndividualStatements statementTranslator, ITranslateValueSettingsStatements valueSettingStatementTranslator, ILogInformation logger) : base(supportRefName, envClassName, envRefName, outerClassName, outerRefName, nameRewriter, tempNameGenerator, statementTranslator, valueSettingStatementTranslator, logger) { }
public ValueSettingStatementsTranslator( CSharpName supportRefName, CSharpName envRefName, CSharpName outerRefName, VBScriptNameRewriter nameRewriter, ITranslateIndividualStatements statementTranslator, ILogInformation logger) { if (supportRefName == null) { throw new ArgumentNullException("supportRefName"); } if (envRefName == null) { throw new ArgumentNullException("envRefName"); } if (outerRefName == null) { throw new ArgumentNullException("outerRefName"); } if (nameRewriter == null) { throw new ArgumentNullException("nameRewriter"); } if (statementTranslator == null) { throw new ArgumentNullException("statementTranslator"); } if (logger == null) { throw new ArgumentNullException("logger"); } _supportRefName = supportRefName; _envRefName = envRefName; _outerRefName = outerRefName; _nameRewriter = nameRewriter; _statementTranslator = statementTranslator; _logger = logger; }