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