94 references to ToArray
BuildValidator (1)
CompilationDiff.cs (1)
404var hashString = BitConverter.ToString(info.CompressedHash.ToArray()).Replace("-", "");
Microsoft.CodeAnalysis (10)
Collections\ImmutableArrayExtensions.cs (1)
774T[] copy = array.ToArray();
CryptographicHashProvider.cs (2)
186return ComputeSha1(bytes.ToArray()); 221incrementalHash.AppendData(bytes.ToArray());
Emit\EditAndContinueMethodDebugInformation.cs (3)
102fixed (byte* compressedSlotMapPtr = &compressedSlotMap.ToArray()[0]) 215fixed (byte* blobPtr = &compressedLambdaMap.ToArray()[0]) 318fixed (byte* ptr = &compressedStateMachineStates.ToArray()[0])
InternalUtilities\OneOrMany.cs (1)
188=> HasOneItem ? new[] { _one } : _many.ToArray();
PEWriter\MetadataWriter.cs (1)
1112return signatureBlob.ToArray();
StrongName\DesktopStrongNameProvider.cs (1)
249fixed (byte* pinned = keyPair.ToArray())
StrongName\StrongNameKeys.cs (1)
99nameof(CompilationOptions.CryptoPublicKey), BitConverter.ToString(publicKey.ToArray())));
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
774T[] copy = array.ToArray();
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
188=> HasOneItem ? new[] { _one } : _many.ToArray();
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
515AssertEx.Equal(new[] { RuntimeEnvironment.GetRuntimeDirectory() }.Concat(new[] { @"x", @"..\goo", @"../bar", @"a b" }.Select(prependBasePath)), args.ReferencePaths.ToArray()); 8894Assert.Equal(mvid, ReadMvid(new MemoryStream(imageDll.GetContent().ToArray()))); 8895Assert.Equal(mvid, ReadMvid(new MemoryStream(imagePdb.GetContent().ToArray())));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Classification\SemanticClassifierTests_TestMarkup.cs (1)
132Punctuation.CloseCurly).ToArray();
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (1)
305context.RegisterSyntaxNodeAction(CodeBlockAnalyzer.AnalyzeNode, CodeBlockAnalyzer.SyntaxKindsOfInterest.ToArray());
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (4)
Emit\CompilationEmitTests.cs (2)
1265var refAssembly1 = Assembly.ReflectionOnlyLoad(metadataImage1.ToArray()); 1274var refOnlyAssembly1 = Assembly.ReflectionOnlyLoad(refOnlyMetadataImage1.ToArray());
Emit\ResourceTests.cs (2)
781Assert.Equal((int)ErrorCode.ERR_CantReadResource, result.Diagnostics.ToArray()[0].Code); 808Assert.Equal((int)ErrorCode.ERR_CantReadResource, result.Diagnostics.ToArray()[0].Code);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (7)
Emit\EditAndContinue\EditAndContinueTestBase.cs (4)
251File.WriteAllBytes(Path.Combine(outputDirectory, baseName + ".dll" + extSuffix), baseline.EmittedAssemblyData.ToArray()); 252File.WriteAllBytes(Path.Combine(outputDirectory, baseName + ".pdb" + extSuffix), baseline.EmittedAssemblyPdb.ToArray()); 256File.WriteAllBytes(Path.Combine(outputDirectory, $"{baseName}.{i + 1}.metadata{extSuffix}"), diffs[i].MetadataDelta.ToArray()); 257File.WriteAllBytes(Path.Combine(outputDirectory, $"{baseName}.{i + 1}.pdb{extSuffix}"), diffs[i].PdbDelta.ToArray());
PDB\PDBTests.cs (3)
76var hash1 = CryptographicHashProvider.ComputeSha1(Encoding.Unicode.GetBytesWithPreamble(tree1.ToString())).ToArray(); 77var hash3 = CryptographicHashProvider.ComputeSha1(new UTF8Encoding(true, false).GetBytesWithPreamble(tree3.ToString())).ToArray(); 78var hash4 = CryptographicHashProvider.ComputeSha1(new UTF8Encoding(false, false).GetBytesWithPreamble(tree4.ToString())).ToArray();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
FlowAnalysis\FlowDiagnosticTests.cs (2)
1874var bindingDiags = comp.GetDiagnostics().ToArray(); 1878var emitDiags = comp.Emit(new System.IO.MemoryStream()).Diagnostics.ToArray();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\InheritanceBindingTests.cs (2)
2996new[] { source1 }, TargetFrameworkUtil.GetReferences(TargetFramework.Standard, null).ToArray(), TestOptions.DebugDll.WithPublicSign(true)); 2999new[] { source1 }, TargetFrameworkUtil.GetReferences(TargetFramework.Standard, null).ToArray(), TestOptions.DebugDll.WithPublicSign(true));
Semantics\NativeIntegerTests.cs (1)
1048var references = TargetFrameworkUtil.GetReferences(TargetFramework.Standard).ToArray();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (10)
Compilation\GetSemanticInfoBrokenCodeTests.cs (1)
178var diagnostics = model.GetDiagnostics().ToArray();
DocumentationComments\CrefTests.cs (2)
1215AssertEx.SetEqual(expectedCandidates.AsEnumerable(), actualCandidates.ToArray()); 1389AssertEx.SetEqual(expectedCandidates, actualCandidates.ToArray());
Symbols\AnonymousTypesSymbolTests.cs (1)
237Assembly refAsm = Assembly.Load(image.ToArray());
Symbols\CompilationCreationTests.cs (2)
2823var diagnostics = compilation.GetDiagnostics().ToArray(); 2863var diags = compilation.GetDiagnostics().ToArray();
Symbols\GenericConstraintTests.cs (2)
7328TargetFrameworkUtil.NetStandard20References.ToArray(), 7334TargetFrameworkUtil.NetStandard20References.ToArray(),
Symbols\Retargeting\RetargetingTests.cs (1)
934var standardReference = TargetFrameworkUtil.StandardReferences.ToArray();
Symbols\Source\NullablePublicAPITests.cs (1)
377return c.GetMembers("M1").OfType<IMethodSymbol>().Single().Parameters.ToArray();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CSharpTestSource.cs (1)
85public static implicit operator CSharpTestSource(ImmutableArray<SyntaxTree> source) => new CSharpTestSource(source.ToArray());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
CodeGeneration\CodeGenerationTests.cs (1)
646var members = onlyGenerateMembers ? symbol.GetMembers().ToArray() : new[] { symbol };
Completion\TestFileSystemCompletionHelper.cs (1)
42=> _drives.ToArray();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
172var diagnostics = compilation.GetDiagnostics().ToArray();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
ReflectionUtilities.cs (1)
19return Assembly.Load(assembly.ToArray());
Microsoft.CodeAnalysis.Features (1)
Diagnostics\Analyzers\UnboundIdentifiersDiagnosticAnalyzerBase.cs (1)
45context.RegisterSyntaxNodeAction(AnalyzeNode, SyntaxKindsOfInterest.ToArray());
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
393fixed (byte* ptr = delta.ToArray())
Microsoft.CodeAnalysis.InteractiveHost (5)
Interactive\Core\InteractiveHostPlatformInfo.cs (1)
46PlatformAssemblyPaths = PlatformAssemblyPaths.ToArray(),
Interactive\Core\RemoteExecutionResult.cs (2)
66SourcePaths = SourcePaths.ToArray(), 67ReferencePaths = ReferencePaths.ToArray(),
Interactive\Core\RemoteInitializationResult.cs (2)
45MetadataReferencePaths = MetadataReferencePaths.ToArray(), 46Imports = Imports.ToArray(),
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\DecompiledSource\AssemblyResolver.cs (1)
67return new PEFile(pair.fileName, new MemoryStream(pair.image.ToArray()), streamOptions);
Microsoft.CodeAnalysis.Rebuild.UnitTests (2)
BasicDeterministicKeyBuilderTests.cs (1)
40references ?? NetCoreApp.References.ToArray(),
CSharpDeterministicKeyBuilderTests.cs (1)
39references ?? NetCoreApp.References.ToArray(),
Microsoft.CodeAnalysis.Test.Utilities (11)
CompilationVerifier.cs (2)
623pdbStream: new MemoryStream(EmittedAssemblyPdb.ToArray()), 624peStream: new MemoryStream(EmittedAssemblyData.ToArray()),
Diagnostics\TestDiagnosticAnalyzer.cs (3)
47context.RegisterSymbolAction(this.AnalyzeSymbol, AllSymbolKinds.ToArray()); 50context.RegisterSyntaxNodeAction<TLanguageKindEnum>(this.AnalyzeNode, AllSyntaxKinds.ToArray()); 117context.RegisterSyntaxNodeAction(_container.AnalyzeNode, TestDiagnosticAnalyzer<TLanguageKindEnum>.AllSyntaxKinds.ToArray());
Metadata\ILValidation.cs (1)
269fixed (byte* ilPtr = ilArray.ToArray())
Mocks\Silverlight.cs (1)
79Debug.Assert("7C-EC-85-D7-BE-A7-79-8E" == BitConverter.ToString(publicKeyToken.ToArray()));
Mocks\StdOle.cs (1)
66Debug.Assert("B0-3F-5F-7F-11-D5-0A-3A" == BitConverter.ToString(publicKeyToken.ToArray()));
Platform\Desktop\CLRHelpers.cs (1)
71return PeVerify(peImage.ToArray(), AppDomain.CurrentDomain.Id, assemblyPath: null);
Platform\Desktop\DesktopRuntimeUtil.cs (1)
83byte[] bytes = rawAssembly.ToArray();
Platform\Desktop\RuntimeAssemblyManager.cs (1)
345return assembly.LoadModule(args.Name, rawModule.ToArray());
Microsoft.CodeAnalysis.UnitTests (2)
MetadataReferences\AssemblyIdentityExtensions.cs (2)
33result.SetPublicKey(identity.PublicKey.ToArray()); 38result.SetPublicKeyToken(identity.PublicKeyToken.ToArray());
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
774T[] copy = array.ToArray();
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
188=> HasOneItem ? new[] { _one } : _many.ToArray();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
774T[] copy = array.ToArray();
src\Compilers\Core\Portable\InternalUtilities\OneOrMany.cs (1)
188=> HasOneItem ? new[] { _one } : _many.ToArray();
Microsoft.DotNet.SignTool (1)
src\ContentUtil.cs (1)
36=> BitConverter.ToString(hash.ToArray()).Replace("-", "");
Microsoft.Interop.ComInterfaceGenerator (1)
VirtualMethodPointerStubGenerator.cs (1)
122.AddAttributeLists(stub.AdditionalAttributes.ToArray())
Microsoft.Interop.JavaScript.JSImportGenerator (1)
JSImportGenerator.cs (1)
114.AddAttributeLists(stub.SignatureContext.AdditionalAttributes.ToArray())
Microsoft.Interop.LibraryImportGenerator (1)
LibraryImportGenerator.cs (1)
180.AddAttributeLists(stub.AdditionalAttributes.ToArray())
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
DownlevelLibraryImportGenerator.cs (1)
122.AddAttributeLists(stub.AdditionalAttributes.ToArray())
Microsoft.ML.Data (1)
Transforms\Normalizer.cs (1)
482ctx.Writer.WriteIntArray(vectorType.Dimensions.ToArray());
Microsoft.ML.Transforms (1)
Text\LdaTransform.cs (1)
1342return LatentDirichletAllocationTransformer.TrainLdaTransformer(_host, input, _columns.ToArray());
Microsoft.VisualStudio.LanguageServices (5)
Options\VisualStudioSettingsOptionPersister.cs (4)
210value = stringArray.IsDefault ? null : stringArray.ToArray(); 214value = boolArray.IsDefault ? null : boolArray.ToArray(); 218value = intArray.IsDefault ? null : intArray.ToArray(); 222value = longArray.IsDefault ? null : longArray.ToArray();
ProjectSystem\FileChangeWatcher.cs (1)
310await service.FilterDirectoryChangesAsync(cookie, _filters.ToArray(), cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
137return cachedCharacters.ToArray();
Roslyn.Test.PdbUtilities (1)
Reader\SymReaderFactory.cs (1)
75return CreateReader(new MemoryStream(pdbImage.ToArray()), (peImageOpt.IsDefault) ? null : new PEReader(peImageOpt));
System.Reflection.Metadata (2)
System\Reflection\Metadata\AssemblyNameInfo.cs (2)
172assemblyName.SetPublicKey(PublicKeyOrToken.ToArray()); 176assemblyName.SetPublicKeyToken(PublicKeyOrToken.ToArray());
System.Reflection.MetadataLoadContext (2)
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeData.cs (1)
74Type[] parameterTypes = sig.ParameterTypes.ToArray();
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.TypeProvider.cs (1)
32return roDefinitionType.GetUniqueConstructedGenericType(typeArguments.ToArray());