25 references to IntegerUtilities
Microsoft.CodeAnalysis.CSharp.Features (2)
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
190
foreach (var field in fields.OrderBy(f =>
IntegerUtilities
.ToInt64(f.ConstantValue)))
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
22
using static
IntegerUtilities
;
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
CastSimplifier.cs (2)
139
IntegerUtilities
.IsIntegral(constantValue.Value) &&
140
IntegerUtilities
.ToInt64(constantValue.Value) == 0;
EnumMemberGenerator.cs (3)
91
var value =
IntegerUtilities
.ToInt64(enumMember.ConstantValue);
118
IntegerUtilities
.HasOneBitSet(value))
127
var shiftValue =
IntegerUtilities
.LogBase2(value);
Microsoft.CodeAnalysis.Features (4)
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
53
var value =
IntegerUtilities
.ToInt64(valueOpt.Value);
PopulateSwitchExpressionHelpers.cs (1)
80
enumMembers.Remove(
IntegerUtilities
.ToInt64(value));
PopulateSwitchStatementHelpers.cs (2)
121
var caseValue =
IntegerUtilities
.ToInt64(value.ConstantValue.Value);
154
var enumValue =
IntegerUtilities
.ToInt64(fieldSymbol.ConstantValue);
Microsoft.CodeAnalysis.VisualBasic.Workspaces (10)
CodeGeneration\EnumMemberGenerator.vb (9)
68
Dim value =
IntegerUtilities
.ToInt64(enumMember.ConstantValue)
89
If lastExpression.Kind = SyntaxKind.LeftShiftExpression AndAlso
IntegerUtilities
.HasOneBitSet(value) Then
95
Dim shiftValue =
IntegerUtilities
.LogBase2(value)
100
right:=SyntaxFactory.NumericLiteralExpression(SyntaxFactory.IntegerLiteralToken(shiftValue.ToString(), LiteralBase.Decimal, TypeCharacter.None,
IntegerUtilities
.ToUnsigned(shiftValue))))
116
SyntaxFactory.IntegerLiteralToken(firstTwoChars + ushortValue.ToString("X") + lastTwoChars, LiteralBase.Hexadecimal, TypeCharacter.UShortLiteral,
IntegerUtilities
.ToUnsigned(ushortValue)))
121
SyntaxFactory.IntegerLiteralToken(firstTwoChars + shortValue.ToString("X") + numericText.Last(), LiteralBase.Hexadecimal, TypeCharacter.ShortLiteral,
IntegerUtilities
.ToUnsigned(shortValue)))
124
SyntaxFactory.IntegerLiteralToken(firstTwoChars + value.ToString("X"), LiteralBase.Hexadecimal, TypeCharacter.None,
IntegerUtilities
.ToUnsigned(value)))
127
Return SyntaxFactory.NumericLiteralExpression(SyntaxFactory.IntegerLiteralToken(numericText.Substring(0, 2) + Convert.ToString(value, 8), LiteralBase.Octal, TypeCharacter.None,
IntegerUtilities
.ToUnsigned(value)))
129
Return SyntaxFactory.NumericLiteralExpression(SyntaxFactory.IntegerLiteralToken(numericText.Substring(0, 2) + Convert.ToString(value, 2), LiteralBase.Binary, TypeCharacter.None,
IntegerUtilities
.ToUnsigned(value)))
CodeGeneration\ExpressionGenerator.vb (1)
210
IntegerUtilities
.ToUInt64(nonNegativeValue)))
Microsoft.CodeAnalysis.Workspaces (4)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (2)
64
_longValue =
IntegerUtilities
.ToInt64(value);
68
_longValue =
IntegerUtilities
.ToInt64(value);
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
159
longLiterals.Add(
IntegerUtilities
.ToInt64(token.Value));
Shared\Utilities\EnumValueUtilities.cs (1)
116
IntegerUtilities
.HasOneBitSet(existingConstants[0]) &&