public int GetIndentSize() { if (_isEmptyTranslation) { return(0); } var indentSize = _translation.GetIndentSize(); if (_indentContents || _writeBraces) { var indentLength = _context.Settings.IndentLength; var translationIndentSize = _translation.GetLineCount() * indentLength; indentSize += translationIndentSize; if (_writeBraces) { indentSize += 2 * indentLength; if (_indentContents) { indentSize += translationIndentSize; } } } return(indentSize); }
public int GetLineCount() { var lineCount = _typeNameTranslation.GetLineCount(); if (_boundTranslationCount == 0) { return(lineCount); } for (var i = 0; ;) { var boundLineCount = _boundTranslations[i].GetLineCount(); if (boundLineCount > 1) { lineCount += boundLineCount - 1; } ++i; if (i == _boundTranslationCount) { return(lineCount); } } }
public int GetLineCount() { var parameterLineCount = _parameterTranslation.GetLineCount(); if (_declareParameterInline && _typeNameTranslation != null) { parameterLineCount += _typeNameTranslation.GetLineCount(); } return(parameterLineCount); }
public int GetLineCount() { var lineCount = (_writeBlankLineBefore ? 1 : 0) + _statementTranslation.GetLineCount(); if (UseFinalBlankLine) { lineCount += 1; } return(lineCount); }
public int GetLineCount() { var lineCount = _subjectTranslation.GetLineCount() + _methodInvocationTranslation.GetLineCount(); if (_isPartOfMethodCallChain) { ++lineCount; } return(lineCount); }
public int GetIndentSize() { var indentSize = 0; var indentLength = _settings.IndentLength; for (var i = 0; ;) { indentSize += _caseTestValueTranslations[i].Length * indentLength; var caseTranslation = _caseTranslations[i]; indentSize += caseTranslation.GetLineCount() * indentLength * 2; if (WriteBreak(caseTranslation)) { indentSize += indentLength * 2; } ++i; if (i == _casesCount) { break; } } if (_defaultCaseTranslation != null) { indentSize += indentLength; indentSize += _defaultCaseTranslation.GetLineCount() * indentLength * 2; if (WriteBreak(_defaultCaseTranslation)) { indentSize += indentLength * 2; } } return(indentSize); }
public int GetLineCount() { var subjectLineCount = _subject.GetLineCount(); var parametersLineCount = _parameters.GetLineCount(); if (subjectLineCount == 1) { return(parametersLineCount > 1 ? parametersLineCount : 1); } return(parametersLineCount > 1 ? subjectLineCount + parametersLineCount - 1 : subjectLineCount); }
public int GetLineCount() { _initializerTranslations.IsLongTranslation = TranslationSize > 40; var lineCount = _newingTranslation.GetLineCount(); var initializersLineCount = _initializerTranslations.GetLineCount(); if (initializersLineCount > 1) { lineCount += initializersLineCount - 1; } return(lineCount); }
public int GetLineCount() => _typeNameTranslation.GetLineCount();
public int GetLineCount() => _translation.GetLineCount();
public int GetLineCount() { return(Parameters.None ? _typeNameTranslation.GetLineCount() : Parameters.GetLineCount()); }
public int GetLineCount() => _valueTranslation.GetLineCount();
public int GetLineCount() => _parameterTranslation.GetLineCount();
public int GetLineCount() => _exceptionTypeTranslation.GetLineCount();
public int GetLineCount() { return(_binaryConditionLeftTranslation.GetLineCount() + _binaryConditionRightTranslation.GetLineCount()); }
public int GetIndentSize() { return(_binaryConditionLeftTranslation.GetIndentSize() + _binaryConditionRightTranslation.GetIndentSize() + _binaryConditionRightTranslation.GetLineCount() * _context.Settings.IndentLength); }
public int GetLineCount() => (_thrownItemTranslation?.GetLineCount() + 1).GetValueOrDefault();
public int GetLineCount() => _emptyArrayNewing.GetLineCount();
public int GetLineCount() => _lambdaTranslation.GetLineCount();
public int GetLineCount() => _loopBodyTranslation.GetLineCount() + 1;
public int GetLineCount() { return(Math.Max( _testedValueTranslation.GetLineCount(), _testedTypeNameTranslation.GetLineCount())); }
public int GetLineCount() => _negatedValue.GetLineCount();
public int GetLineCount() => _operand.GetLineCount();
public int GetLineCount() { return(Math.Max( _castTypeNameTranslation.GetLineCount(), _castValueTranslation.GetLineCount())); }
public int GetLineCount() => _subjectTranslation.GetLineCount();
public int GetLineCount() => _typeCanBeNull ? 1 : _typeNameTranslation?.GetLineCount() ?? 1;
public int GetLineCount() => _quotedLambdaTranslation.GetLineCount() + 1;
public int GetLineCount() => _returnValueTranslation.GetLineCount();
public int GetLineCount() => _value.GetLineCount();
public int GetLineCount() { return(Math.Max( _operandTranslation.GetLineCount(), _typeNameTranslation.GetLineCount())); }