647 instantiations of FileInfo
aspire (26)
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
366var fileInfo = new FileInfo(socketPath);
Commands\InitCommand.cs (2)
435var appHostProjectFile = new FileInfo(Path.Combine(finalAppHostDir, $"{appHostProjectDir.Name}.csproj")); 436var serviceDefaultsProjectFile = new FileInfo(Path.Combine(finalServiceDefaultsDir, $"{serviceDefaultsProjectDir.Name}.csproj"));
Commands\Sdk\SdkDumpCommand.cs (1)
82var projectFile = new FileInfo(arg);
DotNet\DotNetCliRunner.cs (1)
1097projects.Add(new FileInfo(projectPath));
Packaging\NuGetConfigMerger.cs (1)
69var targetFile = new FileInfo(targetPath);
Packaging\TemporaryNuGetConfig.cs (2)
25var configFile = new FileInfo(tempFilePath); 35var configFile = new FileInfo(targetPath);
Program.cs (2)
268var globalSettingsFile = new FileInfo(globalSettingsFilePath); 561var globalSettingsFile = new FileInfo(GetGlobalSettingsPath(logger));
Projects\DotNetBasedAppHostServerProject.cs (1)
425var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName));
Projects\GuestAppHostProject.cs (1)
176var settingsFile = new FileInfo(settingsFilePath);
Projects\PrebuiltAppHostServer.cs (1)
244new FileInfo(projectFilePath),
Projects\ProjectLocator.cs (7)
196var appHostFile = new FileInfo(qualifiedPath); 214var settingsFile = new FileInfo(ConfigurationHelper.BuildPathToSettingsJsonFile(searchDirectory.FullName)); 225var appHostFile = new FileInfo(qualifiedAppHostPath); 338return await UseOrFindAppHostProjectFileAsync(new FileInfo(parentDirectory.FullName), multipleAppHostProjectsFoundBehavior, createSettingsFile, cancellationToken); 442var settingsFile = new FileInfo(configurationService.GetSettingsFilePath(isGlobal: false)); 455return new FileInfo(newConfigPath); 458var aspireConfigFile = new FileInfo(Path.Combine(legacySettingsRootDirectory.FullName, AspireConfigFile.FileName));
Projects\ProjectUpdater.cs (3)
52var projectName = new FileInfo(projectGroup.Key).Name; 638var referencedProjectFile = new FileInfo(referencedProjectPath); 702return new CentralPackageManagementInfo(true, new FileInfo(directoryPackagesPropsPath));
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (1)
75var appHostProject = _projectFactory.TryGetProject(new FileInfo(Path.Combine(outputPath, "apphost.ts")));
Utils\ConfigurationHelper.cs (2)
37localSettingsFile = new FileInfo(newSettingsPath); 47localSettingsFile = new FileInfo(legacySettingsPath);
Aspire.Cli.Tests (220)
Commands\DotNetSdkCheckTests.cs (1)
145? new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, appHostFileName))
Commands\ExtensionInternalCommandTests.cs (3)
60var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "MyApp.AppHost.csproj")); 101var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App1.AppHost.csproj")); 102var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App2.AppHost.csproj"));
Commands\InitCommandTests.cs (11)
27var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 30var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName)); 66var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 126new() { ProjectFile = new FileInfo("/test/project1.csproj"), TargetFramework = "net8.0" }, 127new() { ProjectFile = new FileInfo("/test/project2.csproj"), TargetFramework = "net9.0" }, 128new() { ProjectFile = new FileInfo("/test/project3.csproj"), TargetFramework = "net10.0" } 140new() { ProjectFile = new FileInfo("/test/project1.csproj"), TargetFramework = "net8.0" }, 141new() { ProjectFile = new FileInfo("/test/project2.csproj"), TargetFramework = "net9.0" } 150new() { ProjectFile = new FileInfo("/test/project1.csproj"), TargetFramework = "net8.0" } 164var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 219var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln"));
Commands\RestoreCommandTests.cs (2)
18var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 52var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Commands\RunCommandTests.cs (11)
478var appHostProjectFile = new FileInfo(appHostProjectPath); 938var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 988var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1034var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1084var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1129var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1175var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1221var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1268return Task.FromResult(new AppHostProjectSearchResult(new FileInfo("/tmp/apphost.cs"), [new FileInfo("/tmp/apphost.cs")])); 1274return Task.FromResult<FileInfo?>(new FileInfo("/tmp/apphost.cs"));
Commands\SecretCommandTests.cs (2)
21var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 45var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts"));
Commands\UpdateCommandTests.cs (8)
223return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 296return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 504return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 571return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 637return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 695return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 773return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 818return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")));
Configuration\ConfigurationHelperTests.cs (1)
20var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
Configuration\ConfigurationServiceTests.cs (1)
18var globalSettingsFile = new FileInfo(Path.Combine(globalSettingsDir.FullName, AspireConfigFile.FileName));
DotNet\DotNetCliRunnerTests.cs (34)
32var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 72var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 101var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 129var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 168var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 197var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 226var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 264var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 305var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 383var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 423var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 465var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 512var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 560var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 613var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 680var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 746var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 819var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 824var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj")); 828var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj")); 866var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 869var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj")); 899var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 945var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 990var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1035var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1086var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1135var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1183var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1219var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1398var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1436var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1474var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1514var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Packaging\NuGetConfigMergerSnapshotTests.cs (1)
49return new FileInfo(path);
Packaging\NuGetConfigMergerTests.cs (1)
26return new FileInfo(path);
Projects\DefaultLanguageDiscoveryTests.cs (4)
109var file = new FileInfo(Path.Combine(Path.GetTempPath(), fileName)); 124var file = new FileInfo(Path.Combine(Path.GetTempPath(), fileName)); 135var file = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.go")); 148var file = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.go"));
Projects\ExtensionGuestLauncherTests.cs (6)
26new FileInfo("/tmp/apphost.ts"), 51var appHostFile = new FileInfo("/home/user/project/apphost.ts"); 68var launcher = new ExtensionGuestLauncher(service, new FileInfo("/tmp/apphost.ts"), debug: true); 83var launcher = new ExtensionGuestLauncher(service, new FileInfo("/tmp/apphost.ts"), debug: false); 102var launcher = new ExtensionGuestLauncher(service, new FileInfo("/tmp/apphost.ts"), debug: false); 119var launcher = new ExtensionGuestLauncher(service, new FileInfo("/tmp/apphost.ts"), debug: false);
Projects\FallbackProjectParserTests.cs (14)
36var result = parser.ParseProject(new FileInfo(projectFile)); 61var result = parser.ParseProject(new FileInfo(projectFile)); 86var result = parser.ParseProject(new FileInfo(projectFile)); 111var result = parser.ParseProject(new FileInfo(projectFile)); 137var result = parser.ParseProject(new FileInfo(projectFile)); 163var result = parser.ParseProject(new FileInfo(projectFile)); 201parser.ParseProject(new FileInfo(projectFile))); 222var result = parser.ParseProject(new FileInfo(projectFile)); 252var result = parser.ParseProject(new FileInfo(projectFile)); 275var result = parser.ParseProject(new FileInfo(projectFile)); 299var result = parser.ParseProject(new FileInfo(projectFile)); 322var result = parser.ParseProject(new FileInfo(projectFile)); 344var result = parser.ParseProject(new FileInfo(projectFile)); 363parser.ParseProject(new FileInfo(projectFile)));
Projects\GuestRuntimeTests.cs (12)
74var appHostFile = new FileInfo("/tmp/apphost.ts"); 93var appHostFile = new FileInfo("/tmp/apphost.ts"); 108var appHostFile = new FileInfo("/tmp/apphost.ts"); 125var appHostFile = new FileInfo("/tmp/apphost.ts"); 140var appHostFile = new FileInfo("/tmp/apphost.ts"); 159var appHostFile = new FileInfo("/tmp/apphost.ts"); 180var appHostFile = new FileInfo("/tmp/apphost.ts"); 199var appHostFile = new FileInfo("/home/user/project/apphost.ts"); 218var appHostFile = new FileInfo("/home/user/project/apphost.ts"); 236var appHostFile = new FileInfo("/tmp/apphost.ts"); 256var appHostFile = new FileInfo("/tmp/apphost.ts"); 344var appHostFile = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.ts"));
Projects\ProjectLocatorTests.cs (56)
37var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 55var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 59var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj")); 63var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 89var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 93var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj")); 97var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 120var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj")); 125var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 161var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 165var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 191var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj")); 194var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj")); 209var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 212var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj")); 255var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}")); 270var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 287var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 297var globalSettingsFile = new FileInfo(globalSettingsFilePath); 307var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)); 326var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "MyAppHost.csproj")); 331var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj")); 339var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json")); 347var globalSettingsFile = new FileInfo(globalSettingsFilePath); 375var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 400var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs")); 426var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs")); 436var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj")); 441var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs")); 481var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 501var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj")); 506var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs")); 542var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 566var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 587var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 598var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj")); 613var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt")); 633var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 638var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs")); 743var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj")); 762var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 780var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 797var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj")); 799var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj")); 819var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 834var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs")); 848var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 862var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj")); 881var directoryAsFileInfo = new FileInfo(topDirectory.FullName); 901var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj")); 906var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs")); 944var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj")); 948var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs")); 986var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs")); 1009var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1030var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Projects\ProjectUpdaterTests.cs (49)
30var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 33var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 36var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 140var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 143var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 146var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 271var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 274var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 277var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 421var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj")); 424var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj")); 427var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj")); 430var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj")); 554var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 557var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 559var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 690var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 692var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 792var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 794var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 903var projectFile = new FileInfo("/path/to/MyProject.csproj"); 925var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 927var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1038var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1040var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1162var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1164var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1276var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1278var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1387var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1481var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1483var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1583var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1662var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1744var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 1827var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 1909var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1995var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2073var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2151var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2258var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2260var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2398await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout(); 2425await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout(); 2457await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout(); 2488await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout(); 2515await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout(); 2543await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout(); 2593await ProjectUpdater.UpdateSdkVersionInCsprojAppHostAsync(new FileInfo(projectFile), package).DefaultTimeout();
TestServices\TestProjectLocator.cs (1)
31return new FileInfo(fakeProjectFilePath);
Utils\CliTestHelper.cs (2)
73var globalSettingsFile = new FileInfo(globalSettingsFilePath); 333return new FileInfo(globalSettingsFilePath);
Aspire.EndToEnd.Tests (1)
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
55installTemplates = packageIdAndPaths.Where(t => new FileInfo(t.path).LastWriteTimeUtc > dirWriteTime).Any();
Aspire.Hosting (3)
Dcp\KubernetesService.cs (2)
588var fileInfo = new FileInfo(locations.DcpKubeconfigPath); 592fileInfo = new FileInfo(locations.DcpKubeconfigPath);
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
83var projectFileInfo = new FileInfo(projectMetadata.ProjectPath);
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
83var projectFileInfo = new FileInfo(projectMetadata.ProjectPath);
Aspire.Hosting.Maui (2)
Utilities\MauiEnvironmentHelper.cs (2)
162var info = new FileInfo(file); 317var info = new FileInfo(file);
Aspire.Hosting.Tests (3)
Publishing\ResourceContainerImageManagerTests.cs (3)
711var fileInfo = new FileInfo(tempFile); 872annotation.BuildSecrets["FILE_SECRET"] = new FileInfo(tempSecretFile); 889Assert.Equal(new FileInfo(tempSecretFile).FullName, fakeContainerRuntime.CapturedBuildSecrets["FILE_SECRET"].Value);
Aspire.Templates.Tests (1)
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
55installTemplates = packageIdAndPaths.Where(t => new FileInfo(t.path).LastWriteTimeUtc > dirWriteTime).Any();
BuildValidator (1)
Program.cs (1)
316var originalBinary = new FileInfo(assemblyInfo.FilePath);
csc (1)
src\Compilers\Shared\NativeMethods.cs (1)
142return new FileInfo(TrimWin32ExtendedPrefix(sb.ToString()));
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
122return new FileInfo(project);
dotnet-svcutil.xmlserializer (2)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
220FileInfo fileInfo = new FileInfo(value); 425var file = new FileInfo(path);
dotnet-svcutil-lib (9)
CommandProcessorOptions.cs (1)
463this.OutputFile = new FileInfo(outputFile);
Shared\MSBuildProj.cs (3)
316fullPath = new FileInfo(Path.Combine(msbuildProj.DirectoryPath, binReference)).FullName; 802var assetsFile = new FileInfo(Path.Combine(this.DirectoryPath, "obj", "project.assets.json")).FullName; 1012.Select(f => new FileInfo(f))
Shared\Options\ApplicationOptions.cs (1)
163return Deserialize<TOptionsBase, OptionsSerializer<TOptionsBase>>(null, new FileInfo(filePath), throwOnError);
Shared\Options\OptionValueParser.cs (1)
60value = CreateValue<FileInfo>(() => new FileInfo(stringValue), option, stringValue);
Shared\Options\UpdateOptions.cs (2)
94this.OutputFile = new FileInfo(relPath); 112this.OutputFile = new FileInfo(Path.Combine(optionsFileDirectory.FullName, this.OutputFile.OriginalPath()));
Shared\ProjectPropertyResolver.cs (1)
207.Select(f => new FileInfo(f));
GenerateDocumentationAndConfigFiles (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
HelixTestTasks (1)
GroupWorkItems.cs (1)
43size = new FileInfo(item.ItemSpec).Length;
IIS.ShadowCopy.Tests (1)
ShadowCopyTests.cs (1)
415var fileInfo = new FileInfo(filePath)
illink (1)
Metrics (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Metrics.Legacy (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.AspNetCore.DataProtection.Extensions.Tests (1)
DataProtectionProviderTests.cs (1)
74var file = new FileInfo(newFileName);
Microsoft.AspNetCore.FunctionalTests (1)
WebHostFunctionalTests.cs (1)
242var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "DefaultBuilder.slnf"));
Microsoft.AspNetCore.Http (1)
SendFileFallback.cs (1)
25var fileInfo = new FileInfo(filePath);
Microsoft.AspNetCore.Http.Results (1)
PhysicalFileHttpResult.cs (1)
166var fileInfo = new FileInfo(path);
Microsoft.AspNetCore.HttpLogging (2)
FileLoggerProcessor.cs (2)
189var fileInfo = new FileInfo(fullName); 216fileInfo = new FileInfo(fullName);
Microsoft.AspNetCore.InternalTesting (2)
TestPathUtilities.cs (2)
19var projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, $"{solution}.slnf")); 25projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "AspNetCore.slnx"));
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\PhysicalFileResultExecutor.cs (1)
125var fileInfo = new FileInfo(path);
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
527var depsFile = new FileInfo(Path.Combine(AppContext.BaseDirectory, depsFileName));
Microsoft.AspNetCore.Razor.Language.UnitTests (6)
DefaultRazorProjectItemTest.cs (6)
20var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 40var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 53var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 66var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 79var fileInfo = new FileInfo(Path.Combine(TestFolder, "Views", "FileDoesNotExist.cshtml")); 93var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
Microsoft.AspNetCore.Razor.Test.Common (1)
Language\TestProject.cs (1)
171var fileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, fileName));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
ResponseSendFileTests.cs (1)
32FileLength = new FileInfo(AbsoluteFilePath).Length;
Microsoft.Build (3)
BackEnd\Components\Scheduler\Scheduler.cs (2)
1128System.IO.FileInfo f = new FileInfo(_configCache[unscheduledRequest.BuildRequest.ConfigurationId].ProjectFullPath); 1170System.IO.FileInfo f = new FileInfo(_configCache[unscheduledRequest.BuildRequest.ConfigurationId].ProjectFullPath);
Construction\ProjectRootElement.cs (1)
1981FileInfo fileInfo = new FileInfo(path);
Microsoft.Build.CommandLine.UnitTests (6)
PerfLog_Tests.cs (1)
53files.ShouldAllBe(f => new FileInfo(f).Length > 0);
XMake_Tests.cs (5)
2791new FileInfo(binLog1).Length.ShouldBeGreaterThan(0, "First binlog should not be empty"); 2792new FileInfo(binLog2).Length.ShouldBeGreaterThan(0, "Second binlog should not be empty"); 2793new FileInfo(binLog3).Length.ShouldBeGreaterThan(0, "Third binlog should not be empty"); 2869long size1 = new FileInfo(binLog1).Length; 2870long size2 = new FileInfo(binLog2).Length;
Microsoft.Build.EndToEnd.Tests (1)
MultithreadedExecution_Tests.cs (1)
140new FileInfo(binlogPath).Length.ShouldBeGreaterThan(0, "Binary log file was created but is empty.");
Microsoft.Build.Engine.OM.UnitTests (3)
Definition\ProjectItem_Tests.cs (1)
324FileInfo info = new FileInfo(path);
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (2)
51var lwtBefore = new FileInfo(proj1Path).LastWriteTimeUtc; 70var lwtAfter = new FileInfo(proj1Path).LastWriteTimeUtc;
Microsoft.Build.Engine.UnitTests (9)
BackEnd\BuildManager_Tests.cs (1)
4703.Select(path => new FileInfo(path))
BackEnd\TargetBuilder_Tests.cs (6)
224var fileA = new FileInfo(files.CreatedFiles[0]); 225var fileB = new FileInfo(files.CreatedFiles[1]); 226var fileC = new FileInfo(files.CreatedFiles[2]); 268var fileA = new FileInfo(files.CreatedFiles[0]); 269var fileB = new FileInfo(files.CreatedFiles[1]); 270var fileC = new FileInfo(files.CreatedFiles[2]);
FileLogger_Tests.cs (2)
376var result = new FileInfo(logFile); 378Assert.Equal(0, new FileInfo(logFile).Length);
Microsoft.Build.Framework (3)
BuildEnvironmentHelper.cs (1)
561currentMSBuildExeFile = new FileInfo(currentMSBuildExePath);
FileUtilities.cs (2)
453FileInfo file = new(testFilePath); 1210fileInfo = new FileInfo(filePath);
Microsoft.Build.Framework.UnitTests (1)
FileUtilities_Tests.cs (1)
196Assert.Equal(info.LastWriteTime, new FileInfo(file).LastWriteTime);
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
306FileInfo actualPdbInfo = new FileInfo(actualPdb); 314FileInfo desiredPdbInfo = new FileInfo(desiredLocation);
src\Compilers\Shared\NativeMethods.cs (1)
142return new FileInfo(TrimWin32ExtendedPrefix(sb.ToString()));
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
306FileInfo actualPdbInfo = new FileInfo(actualPdb); 314FileInfo desiredPdbInfo = new FileInfo(desiredLocation);
src\Compilers\Shared\NativeMethods.cs (1)
142return new FileInfo(TrimWin32ExtendedPrefix(sb.ToString()));
Microsoft.Build.Tasks.Core (13)
BootstrapperUtil\BootstrapperBuilder.cs (3)
225var fi = new FileInfo(de.Value); 1514var fi = new FileInfo(packageFileSource.Value); 1620var fi = new FileInfo(filePath);
DownloadFile.cs (1)
185var destinationFile = new FileInfo(Path.Combine(destinationDirectory.FullName, filename));
FileState.cs (3)
127Length = new FileInfo(_filename).Length; 144var fileInfo = new FileInfo(_filename); 195var length = (new FileInfo(_filename)).Length;
ManifestUtil\Util.cs (1)
220FileInfo fi = new FileInfo(path);
Move.cs (1)
200var info = new FileInfo(file);
ResGenDependencies.cs (1)
373var outputFile = new FileInfo(FileUtilities.FixFilePath(outputFileName));
SdkToolsPathUtility.cs (1)
150return new FileInfo(filePath).Exists;
Unzip.cs (1)
192FileInfo destinationPath = new(fullDestinationPath);
ZipDirectory.cs (1)
76FileInfo destinationFile = new FileInfo(destinationFileAbsolutePath);
Microsoft.Build.Tasks.UnitTests (49)
ConvertToAbsolutePath_Tests.cs (3)
26FileInfo testFile = new FileInfo(fileName); 58FileInfo testFile = new FileInfo(fileName); 88FileInfo testFile = new FileInfo(fileName);
Copy_Tests.cs (2)
607FileInfo sourcefi = new FileInfo(source); 610FileInfo destinationfi = new FileInfo(destination);
DownloadFile_Tests.cs (3)
79FileInfo file = new FileInfo(Path.Combine(folder.Path, "foo.txt")); 125FileInfo file = new FileInfo(Path.Combine(folder.Path, filename)); 160FileInfo file = new FileInfo(Path.Combine(folder.Path, filename));
FileStateTests.cs (22)
56delegate () { var x = new FileInfo(new String('x', 5000)).LastWriteTime; }, 68FileInfo info = new FileInfo(file); 87FileInfo info = new FileInfo(file); 114FileInfo info = new FileInfo(file); 133FileInfo info = new FileInfo(file); 152FileInfo info = new FileInfo(file); 171FileInfo info = new FileInfo(file); 190FileInfo info = new FileInfo(file); 216FileInfo info = new FileInfo(file); 242FileInfo info = new FileInfo(file); 268FileInfo info = new FileInfo(file); 296FileInfo info = new FileInfo(file); 321FileInfo info = new FileInfo(file); 331(new FileInfo(file)).IsReadOnly = false; 339Assert.Equal(new FileInfo(Path.GetTempPath()).Exists, new FileState(TestPath(Path.GetTempPath())).FileExists); 346Assert.Equal(new FileInfo(Path.GetTempPath()).IsReadOnly, new FileState(TestPath(Path.GetTempPath())).IsReadOnly); 352Assert.Equal(new FileInfo(Path.GetTempPath()).LastWriteTime, new FileState(TestPath(Path.GetTempPath())).LastWriteTime); 358Assert.Equal(new FileInfo(Path.GetTempPath()).LastWriteTimeUtc, new FileState(TestPath(Path.GetTempPath())).LastWriteTimeUtcFast); 364Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(Path.GetTempPath()).Length; }, delegate () { var x = new FileState(TestPath(Path.GetTempPath())).Length; }); 374Assert.Equal(new FileInfo(file).LastWriteTime, new FileState(TestPath(file)).LastWriteTime); 384Assert.Equal(new FileInfo(file).LastWriteTimeUtc, new FileState(TestPath(file)).LastWriteTimeUtcFast); 392Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(file).Length; }, delegate () { var x = new FileState(TestPath(file)).Length; });
FindUnderPath_Tests.cs (1)
102testFile = new FileInfo(fileName);
Move_Tests.cs (12)
33FileInfo file = new FileInfo(sourceFile); 54Assert.True(((new FileInfo(destinationFile)).Attributes & FileAttributes.ReadOnly) == 0); // should have cleared r/o bit 79FileInfo file = new FileInfo(sourceFile); 101Assert.True(((new FileInfo(destinationFile)).Attributes & FileAttributes.ReadOnly) == 0); // should have cleared r/o bit 107FileInfo file = new FileInfo(sourceFile); 225FileInfo file = new FileInfo(destinationFile); 246Assert.True(((new FileInfo(destinationFile)).Attributes & FileAttributes.ReadOnly) != 0); // should still be r/o 252FileInfo file = new FileInfo(destinationFile); 334FileInfo file = new FileInfo(destinationFile); 356Assert.True(((new FileInfo(destinationFile)).Attributes & FileAttributes.ReadOnly) == 0); // readonly bit should not be set 389FileInfo file = new FileInfo(destinationFile); 411Assert.True(((new FileInfo(destinationFile)).Attributes & FileAttributes.ReadOnly) == 0); // should have cleared r/o bit
Unzip_Tests.cs (2)
31new FileInfo(file1.Path).IsReadOnly = true; 195new FileInfo(file1.Path).IsReadOnly = true;
XslTransformation_Tests.cs (4)
978Assert.NotEqual(new FileInfo(xmlMultiPaths[0].ItemSpec).Length, new FileInfo(xmlMultiPaths[1].ItemSpec).Length); 979Assert.NotEqual(new FileInfo(outputMultiPaths[0].ItemSpec).Length, new FileInfo(outputMultiPaths[1].ItemSpec).Length);
Microsoft.Build.UnitTests.Shared (3)
EnvironmentProvider.cs (2)
91FileInfo fi = new FileInfo(dotnetExeFromPath); 95fi = new FileInfo(dotnetExeFromPath);
TestEnvironment.cs (1)
549foreach (FileInfo file in newFiles.Except(_originalFiles).Select(f => new FileInfo(f)))
Microsoft.Build.Utilities.Core (2)
ToolLocationHelper.cs (2)
3364bool exists = new FileInfo(filePath).Exists; 3532bool exists = new FileInfo(filePath).Exists;
Microsoft.CodeAnalysis (4)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
271ClearReadOnlyFlagOnFile(new FileInfo(shadowCopyPath));
FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Analyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
8800Assert.True(new FileInfo(exe.Path).Length < oldSize); 8801Assert.True(new FileInfo(pdb.Path).Length < oldSize);
Microsoft.CodeAnalysis.Features (6)
EmbeddedLanguages\StackFrame\StackFrameLexer.cs (1)
263var fileInfo = new FileInfo(str);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
195new FileInfo(fileInfo.TemporaryFilePath).IsReadOnly = true;
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (1)
93new FileInfo(filePath).IsReadOnly = true;
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (3)
182var databaseFileInfo = new FileInfo( 381IOUtilities.PerformIO(() => _service._ioService.Delete(new FileInfo(tempFilePath))); 387=> new(Path.ChangeExtension(databaseFileInfo.FullName, ".bin"));
Microsoft.CodeAnalysis.InteractiveHost (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
ExportProviderBuilderTests.cs (1)
143var fileInfo = new FileInfo(tempFile.Path);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\DefaultRazorProjectItem.cs (1)
55public FileInfo File => _fileInfo ??= new(FilePath);
Microsoft.CodeAnalysis.Remote.Razor.UnitTests (2)
RemoteMefCompositionTest.cs (2)
63Assert.True(new FileInfo(cacheFile).Length > 35); 88Assert.True(new FileInfo(cacheFile).Length > 35);
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
617StripReadOnlyAttributeFromFile(new FileInfo(shadowCopyPath));
Microsoft.CodeAnalysis.Test.Utilities (1)
AssemblyLoadTestFixture.cs (1)
547var fileInfo = new FileInfo(tempFile.Path);
Microsoft.CodeAnalysis.Workspaces (4)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
271ClearReadOnlyFlagOnFile(new FileInfo(shadowCopyPath));
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NetCoreTests.cs (1)
121var buildLogInfo = new FileInfo(buildLogPath);
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
55var currentAssemblyLocation = new FileInfo(typeof(BaseTestClass).Assembly.Location);
Microsoft.DotNet.Build.Tasks.Feed (5)
src\AzureStorageExtensions.cs (1)
35var localFileSize = new FileInfo(file).Length;
src\PublishArtifactsInManifestBase.cs (2)
800FileInfo pdbStagingPath = new(Path.Combine(pdbStagePath, subPath)); 828FileInfo looseFileStagePath = new(Path.Combine(pdbStagePath, relativePath));
src\PushToBuildStorage.cs (2)
564FileInfo destFile = new(destFileName); 598if (new FileInfo(sourceFileName).IsReadOnly)
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
38packageIndexFiles.Select(packageIndexFile => new FileInfo(packageIndexFile))
Microsoft.DotNet.Build.Tasks.Packaging.Tests (2)
PackageIndexTests.cs (2)
52long previousLength = new FileInfo(packageIndexFile).Length; 56var newFileInfo = new FileInfo(packageIndexFile);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Swix\MsiSwixProject.wix.cs (1)
112FileInfo fileInfo = new(_msi.ItemSpec);
Microsoft.DotNet.Helix.JobSender (3)
Payloads\ArchivePayload.cs (2)
21Archive = new FileInfo(pathToArchive); 36var alreadyUploadedFile = new FileInfo($"{Archive.FullName}.payload");
Payloads\DirectoryPayload.cs (1)
46var alreadyUploadedFile = new FileInfo(basePath + ".payload");
Microsoft.DotNet.Helix.Sdk (1)
CommandPayload.cs (1)
56var scriptFile = new FileInfo(Path.Combine(Directory.FullName, name));
Microsoft.DotNet.Open.Api.Tools.Tests (41)
OpenApiAddFileTests.cs (6)
85var csproj = new FileInfo(project.Project.Path); 118var csproj = new FileInfo(project.Project.Path); 138var csproj = new FileInfo(project.Project.Path); 158var csproj = new FileInfo(project.Project.Path); 178var csproj = new FileInfo(project.Project.Path); 203var csproj = new FileInfo(project.Project.Path);
OpenApiAddProjectTests.cs (2)
44using var csprojStream = new FileInfo(project.Project.Path).OpenRead(); 102using var csprojStream = new FileInfo(project.Project.Path).OpenRead();
OpenApiAddURLTests.cs (26)
28using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 39using (var jsonStream = new FileInfo(jsonFile).OpenRead()) 61using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 72using (var jsonStream = new FileInfo(jsonFile).OpenRead()) 94using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 105using (var jsonStream = new FileInfo(jsonFile).OpenRead()) 127using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 138using (var jsonStream = new FileInfo(jsonFile).OpenRead()) 159using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 170using (var jsonStream = new FileInfo(jsonFile).OpenRead()) 191using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 202using (var jsonStream = new FileInfo(firstJsonFile).OpenRead()) 217using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 230using (var jsonStream = new FileInfo(secondJsonFile).OpenRead()) 251using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 262using (var jsonStream = new FileInfo(resultFile).OpenRead()) 283using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 294using (var jsonStream = new FileInfo(resultFile).OpenRead()) 315using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 326using (var jsonStream = new FileInfo(resultFile).OpenRead()) 348using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 359using (var jsonStream = new FileInfo(resultFile).OpenRead()) 373using (var csprojStream = new FileInfo(project.Project.Path).OpenRead()) 384using (var jsonStream = new FileInfo(resultFile).OpenRead()) 408var csproj = new FileInfo(project.Project.Path); 434using (var csprojStream = new FileInfo(project.Project.Path).OpenRead())
OpenApiRemoveTests.cs (7)
32var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 47csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 75var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 90csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 124using (var csprojStream = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")).OpenRead()) 138using (var csprojStream = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")).OpenRead()) 177var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj"));
Microsoft.DotNet.RemoteExecutor (1)
RemoteInvokeHandle.cs (1)
229FileInfo exceptionFileInfo = new FileInfo(Options.ExceptionFile);
Microsoft.DotNet.SignTool (6)
src\BatchSignUtil.cs (2)
247FileInfo fileInfo = new FileInfo(file.FullPath); 638var fileInfo = new FileInfo(sigFilePath);
src\ZipData.cs (4)
318if (new FileInfo(path).LinkTarget != null) 359if (new FileInfo(path).LinkTarget != null) 461if (new FileInfo(path).LinkTarget != null) 504if (new FileInfo(path).LinkTarget != null)
Microsoft.DotNet.SignTool.Tests (3)
SignToolTests.cs (3)
461var fileInfo = new FileInfo(layoutPath); 530var fileInfo = new FileInfo(layoutPath); 576var fileInfo = new FileInfo(layoutPath);
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Program.cs (1)
108var file = new FileInfo(fullPath);
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Languages\Language.cs (1)
41var file = new FileInfo(path);
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
GenerateSwaggerCode.cs (1)
86var file = new FileInfo(fullPath);
Microsoft.Extensions.AI.Evaluation.Reporting (3)
Storage\DiskBasedResultStore.cs (3)
97var resultFile = new FileInfo(Path.Combine(resultDir.FullName, $"{result.IterationName}.json")); 143new FileInfo(Path.Combine(_resultsRootPath, executionName, scenarioName, $"{iterationName}.json")); 332var resultFile = new FileInfo(Path.Combine(scenarioDir.FullName, $"{iterationName}.json"));
Microsoft.Extensions.DataIngestion.MarkItDown (1)
MarkItDownReader.cs (1)
121return await ReadAsync(new FileInfo(inputFilePath), identifier, mediaType, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.DataIngestion.Tests (9)
IngestionPipelineTests.cs (2)
34_withTable = new(Path.Combine("TestFiles", "withTable.md")); 55_withImage = new(Path.Combine("TestFiles", "withImage.md"));
Readers\DocumentReaderConformanceTests.cs (4)
27await Assert.ThrowsAsync<ArgumentNullException>("identifier", async () => await reader.ReadAsync(new FileInfo("fileName.txt"), identifier: null!)); 28await Assert.ThrowsAsync<ArgumentException>("identifier", async () => await reader.ReadAsync(new FileInfo("fileName.txt"), identifier: string.Empty)); 62await Assert.ThrowsAsync<TaskCanceledException>(async () => await reader.ReadAsync(new FileInfo(filePath), cts.Token)); 192FileInfo file = new(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + extension));
Readers\MarkItDownMcpReaderTests.cs (3)
24await Assert.ThrowsAsync<ArgumentNullException>("identifier", async () => await reader.ReadAsync(new FileInfo("fileName.txt"), identifier: null!)); 25await Assert.ThrowsAsync<ArgumentException>("identifier", async () => await reader.ReadAsync(new FileInfo("fileName.txt"), identifier: string.Empty)); 45var nonExistentFile = new FileInfo(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (30)
Linux\Disk\DiskStatsReader.cs (1)
18private static readonly FileInfo _diskStatsFile = new("/proc/diskstats");
Linux\LinuxUtilizationParserCgroupV1.cs (10)
25private static readonly FileInfo _cpuCfsQuotaUs = new("/sys/fs/cgroup/cpu/cpu.cfs_quota_us"); 30private static readonly FileInfo _cpuCfsPeriodUs = new("/sys/fs/cgroup/cpu/cpu.cfs_period_us"); 39private static readonly FileInfo _procStat = new("/proc/stat"); 44private static readonly FileInfo _memInfo = new("/proc/meminfo"); 49private static readonly FileInfo _cpuSetCpus = new("/sys/fs/cgroup/cpuset/cpuset.cpus"); 54private static readonly FileInfo _memoryLimitInBytes = new("/sys/fs/cgroup/memory/memory.limit_in_bytes"); 62private static readonly FileInfo _memoryUsageInBytes = new("/sys/fs/cgroup/memory/memory.usage_in_bytes"); 71private static readonly FileInfo _memoryStat = new("/sys/fs/cgroup/memory/memory.stat"); 80private static readonly FileInfo _cpuacctUsage = new("/sys/fs/cgroup/cpuacct/cpuacct.usage"); 85private static readonly FileInfo _cpuPodWeight = new("/sys/fs/cgroup/cpu/cpu.shares");
Linux\LinuxUtilizationParserCgroupV2.cs (17)
35private static readonly FileInfo _cpuCfsQuaotaPeriodUs = new("/sys/fs/cgroup/cpu.max"); 44private static readonly FileInfo _procStat = new("/proc/stat"); 49private static readonly FileInfo _memInfo = new("/proc/meminfo"); 55private static readonly FileInfo _cpuSetCpus = new("/sys/fs/cgroup/cpuset.cpus.effective"); 60private static readonly FileInfo _memoryLimitInBytes = new("/sys/fs/cgroup/memory.max"); 68private static readonly FileInfo _memoryUsageInBytes = new("/sys/fs/cgroup/memory.current"); 77private static readonly FileInfo _memoryStat = new("/sys/fs/cgroup/memory.stat"); 86private static readonly FileInfo _cpuacctUsage = new("/sys/fs/cgroup/cpu.stat"); 91private static readonly FileInfo _cpuPodWeight = new("/sys/fs/cgroup/cpu.weight"); 93private static readonly FileInfo _cpuCgroupInfoFile = new("/proc/self/cgroup"); 154FileInfo cpuUsageFile = new(GetCgroupPath(CpuStat)); 227FileInfo cpuLimitsFile = new(GetCgroupPath(CpuLimit)); 238FileInfo cpuLimitsFile = new(GetCgroupPath(CpuLimit)); 262FileInfo cpuRequestsFile = new(GetCgroupPath(CpuRequest)); 319FileInfo memoryUsageInBytesFile = new(Path.Combine(path, "memory.current")); 520FileInfo memoryMinFile = new(GetCgroupPath(MemoryMin)); 541FileInfo memoryLowFile = new(GetCgroupPath(MemoryLow));
Linux\Network\LinuxNetworkUtilizationParser.cs (2)
23private static readonly FileInfo _tcp = new("/proc/net/tcp"); 28private static readonly FileInfo _tcp6 = new("/proc/net/tcp6");
Microsoft.Extensions.FileProviders.Physical (4)
Internal\FileSystemInfoHelper.cs (1)
35var fileInfo = new FileInfo(filePath);
PhysicalFileProvider.cs (1)
279var fileInfo = new FileInfo(fullPath);
PhysicalFilesWatcher.cs (2)
202var pollingChangeToken = new PollingFileChangeToken(new FileInfo(Path.Combine(_root, filePath))); 383FileSystemInfo fileSystemInfo = new FileInfo(fullPath) is { Exists: true } fileInfo
Microsoft.Extensions.FileSystemGlobbing (1)
Abstractions\DirectoryInfoWrapper.cs (1)
89=> new FileInfoWrapper(new FileInfo(Path.Combine(_directoryInfo.FullName, name)));
Microsoft.Extensions.Logging.AzureAppServices (1)
FileLoggerProvider.cs (1)
46var fileInfo = new FileInfo(fullName);
Microsoft.Maui.Resizetizer (7)
CreatePartialInfoPlistTask.cs (1)
47 var fontFile = new FileInfo(font.ItemSpec);
ResizeImageInfo.cs (2)
81 var fileInfo = new FileInfo(image.GetMetadata("FullPath")); 120 var fgFileInfo = new FileInfo(fgFile);
Resizer.cs (4)
56 var fileInfo = new FileInfo(destination); 80 var fileIn = new FileInfo(inputFile); 81 var fileOut = new FileInfo(outputFile); 82 var fileInputs = inputsFile is null ? null : new FileInfo(inputsFile);
Microsoft.ML.AutoML (3)
Experiment\Runners\RunnerUtil.cs (1)
58new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}_{foldNum}.zip"));
Experiment\Runners\TrainValidateRunner.cs (1)
66new FileInfo(Path.Combine(modelDirectory.FullName, $"Model{iterationNum}.zip"));
Utils\UserInputValidationUtil.cs (1)
171var fileInfo = new FileInfo(path);
Microsoft.ML.AutoML.Tests (2)
DatasetUtil.cs (2)
212var fileInfo = new FileInfo(relativeFilePath); 236Path.Combine(new FileInfo(typeof(
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
47var currentAssemblyLocation = new FileInfo(typeof(IntegrationTestBaseClass).Assembly.Location);
Microsoft.ML.PerformanceTests (2)
ImageClassificationBench.cs (2)
165var currentSize = new FileInfo(relativeFilePath).Length; 208FileInfo dataRoot = new FileInfo(typeof(
Microsoft.ML.Samples (4)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
309FileInfo _dataRoot = new FileInfo(typeof(
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
350FileInfo _dataRoot = new FileInfo(typeof(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
306FileInfo _dataRoot = new FileInfo(typeof(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
327FileInfo _dataRoot = new FileInfo(typeof(
Microsoft.ML.Samples.GPU (4)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
309FileInfo _dataRoot = new FileInfo(typeof(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
350FileInfo _dataRoot = new FileInfo(typeof(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
306FileInfo _dataRoot = new FileInfo(typeof(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
327FileInfo _dataRoot = new FileInfo(typeof(
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
211if (File.Exists(errorFile) && new FileInfo(errorFile).Length == 0)
Microsoft.ML.TestFramework (4)
BaseTestClass.cs (1)
55var currentAssemblyLocation = new FileInfo(typeof(BaseTestClass).Assembly.Location);
CopyAction.cs (3)
26FileInfo file = new FileInfo(oldPath); 27FileInfo destFile = new FileInfo(newPath); 45var testDirectory = new FileInfo(typeof(CopyAction).Assembly.Location).Directory;
Microsoft.ML.Tokenizers.Data.Tests (1)
test\Microsoft.ML.Tokenizers.Tests\Utils.cs (1)
25var fileInfo = new FileInfo(fileName);
Microsoft.ML.Tokenizers.Tests (1)
Utils.cs (1)
25var fileInfo = new FileInfo(fileName);
Microsoft.VisualBasic.Core (6)
Microsoft\VisualBasic\CompilerServices\VB6File.vb (1)
392m_sFullPath = (New FileInfo(sPath)).FullName
Microsoft\VisualBasic\FileSystem.vb (5)
308Return (New FileInfo(PathName)).LastWriteTime 319Return (New FileInfo(PathName)).Length 353Dim f As New FileInfo(PathName) 1323Result = (New FileInfo(sPath)).FullName 1392FileName = (New FileInfo(FileName)).FullName
Microsoft.VisualBasic.Tests (3)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (3)
370var FileInfoFromSystemIO = new FileInfo(TestFile); 484Assert.Equal(0, (new FileInfo(TempFile)).Length); 618CreateTestFile(DestData, PathFromBase: null, TestFileName: (new FileInfo(SourceFileNameWithPath)).Name);
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\AnalyzersCommandHandler.cs (1)
478var fileInfo = new FileInfo(pathToRuleSet);
PresentationFramework (1)
MS\Internal\IO\Packaging\XpsFilter.cs (1)
638FileInfo fi = new FileInfo(filePath);
PresentationUI (2)
MS\Internal\Documents\Application\DocumentProperties.cs (1)
345FileInfo fileInfo = new FileInfo(filePath);
MS\Internal\Documents\Application\DocumentStream.cs (1)
531FileInfo originalInfo = new FileInfo(original);
Replay (1)
src\Compilers\Shared\NativeMethods.cs (1)
142return new FileInfo(TrimWin32ExtendedPrefix(sb.ToString()));
ResultsOfTGenerator (2)
Program.cs (2)
206var file = new FileInfo(classFilePath); 292var file = new FileInfo(testFilePath);
Roslyn.Diagnostics.Analyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
RunTests (2)
Program.cs (2)
237ConsoleUtil.WriteLine($"succeeded ({new FileInfo(dumpFilePath).Length} bytes)"); 435long fileSizeInMegabytes = (new FileInfo(dumpFile).Length / 1024) / 1024;
ServerComparison.FunctionalTests (1)
Helpers.cs (1)
19var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "FunctionalTests.slnf"));
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\DesigntimeLicenseContext.cs (1)
78string fileName = new FileInfo(location).Name;
System.Configuration.ConfigurationManager (2)
System\Configuration\Internal\InternalConfigHost.cs (2)
214FileInfo info = new FileInfo(streamName); 255FileInfo fi = new FileInfo(streamName);
System.Formats.Tar (2)
System\Formats\Tar\TarEntry.cs (1)
482FileInfo link = new(filePath);
System\Formats\Tar\TarWriter.Unix.cs (1)
63FileSystemInfo info = entryType is TarEntryType.Directory ? new DirectoryInfo(fullPath) : new FileInfo(fullPath);
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
879FileInfo packageFileInfo = new FileInfo(path);
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (2)
1459return new FileInfo(originalPath: path, fullPath: fullPath, isNormalized: true); 1481return new FileInfo(originalPath: path, fullPath: fullPath, isNormalized: true);
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (2)
106return new FileInfo(destinationPath, isNormalized: true); 215return new FileInfo(destinationFileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (2)
584FileAttributes attributes = new FileInfo(fullPath, null).Attributes; 723new FileInfo(linkTarget);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.Unix.cs (1)
22: new FileInfo(fullPath, fileName: fileName, isNormalized: true);
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
97FileInfo fileInfo = new FileInfo(filePath);
System.Windows.Forms (4)
System\Windows\Forms\Controls\ListView\ListView.cs (4)
2438fi = new FileInfo(bkImgFileName); 2944FileInfo fi = new(fileName); 3102fi = new FileInfo(_backgroundImageFileName); 3127fi = new FileInfo(bkImgFileName);
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
171FileInfo file = new(path);
Templates.Tests (1)
NewlineEndingTest.cs (1)
63var fileInfo = new FileInfo(filePath);
Test.Utilities (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Text.Analyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
vbc (1)
src\Compilers\Shared\NativeMethods.cs (1)
142return new FileInfo(TrimWin32ExtendedPrefix(sb.ToString()));
VBCSCompiler (1)
src\Compilers\Shared\NativeMethods.cs (1)
142return new FileInfo(TrimWin32ExtendedPrefix(sb.ToString()));
1251 references to FileInfo
aspire (277)
Backchannel\AppHostConnectionResolver.cs (1)
77FileInfo? projectFile,
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
366var fileInfo = new FileInfo(socketPath);
Caching\DiskCache.cs (5)
137foreach (var file in _cacheDirectory.GetFiles("*.json", SearchOption.TopDirectoryOnly)) 188var list = new List<(FileInfo file, long timestamp)>(); 190foreach (var file in matchingFiles) 232foreach (var file in allFiles) 266private void TryDelete(FileInfo file, bool expired = false, bool old = false, bool invalid = false)
Certificates\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Commands\AddCommand.cs (3)
37private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", AddCommandStrings.ProjectArgumentDescription); 73var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption); 75var effectiveAppHostProjectFile = searchResult.SelectedProjectFile;
Commands\AppHostLauncher.cs (6)
35internal static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 77FileInfo? passedAppHostProjectFile, 98var effectiveAppHostFile = searchResult.SelectedProjectFile; 149private async Task StopExistingInstancesAsync(FileInfo effectiveAppHostFile, CancellationToken cancellationToken) 166FileInfo effectiveAppHostFile, 324FileInfo effectiveAppHostFile,
Commands\CacheCommand.cs (3)
55foreach (var file in cacheDirectory.GetFiles("*", SearchOption.AllDirectories)) 86foreach (var file in sdksDirectory.GetFiles("*", SearchOption.AllDirectories)) 118foreach (var file in logsDirectory.GetFiles("*", SearchOption.AllDirectories))
Commands\DescribeCommand.cs (2)
81private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 118var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\ExecCommand.cs (3)
26private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", ExecCommandStrings.ProjectArgumentDescription); 122var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption); 123var effectiveAppHostProjectFile = await _projectLocator.UseOrFindAppHostProjectFileAsync(passedAppHostProjectFile, createSettingsFile: true, cancellationToken);
Commands\ExportCommand.cs (2)
34private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 75var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\InitCommand.cs (9)
191var solutionFile = initContext.SelectedSolutionFile!; 198var projectFileInSolutionDir = solutionDirectory.EnumerateFiles() 435var appHostProjectFile = new FileInfo(Path.Combine(finalAppHostDir, $"{appHostProjectDir.Name}.csproj")); 436var serviceDefaultsProjectFile = new FileInfo(Path.Combine(finalServiceDefaultsDir, $"{serviceDefaultsProjectDir.Name}.csproj")); 639foreach (var project in initContext.SolutionProjects) 821public required FileInfo ProjectFile { get; init; } 837public FileInfo? SelectedSolutionFile { get; set; } 862public IReadOnlyList<FileInfo> SolutionProjects { get; set; } = Array.Empty<FileInfo>();
Commands\LogsCommand.cs (2)
86private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 135var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\McpCallCommand.cs (2)
43private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 69var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\McpToolsCommand.cs (2)
28private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 53var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\PipelineCommandBase.cs (3)
38protected static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", PublishCommandStrings.ProjectArgumentDescription); 129var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption); 169var effectiveAppHostFile = searchResult.SelectedProjectFile;
Commands\ResourceCommand.cs (2)
34private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 70var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\RestoreCommand.cs (3)
33private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 60var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption); 72var effectiveAppHostFile = searchResult.SelectedProjectFile;
Commands\RunCommand.cs (3)
131var passedAppHostProjectFile = parseResult.GetValue(AppHostLauncher.s_appHostOption); 184var effectiveAppHostFile = searchResult.SelectedProjectFile; 614private Task<int> ExecuteDetachedAsync(ParseResult parseResult, FileInfo? passedAppHostProjectFile, bool isExtensionHost, CancellationToken cancellationToken)
Commands\Sdk\SdkDumpCommand.cs (4)
42private static readonly Option<FileInfo?> s_outputOption = new("--output", "-o") 72var outputFile = parseResult.GetValue(s_outputOption); 82var projectFile = new FileInfo(arg); 135FileInfo? outputFile,
Commands\Sdk\SdkGenerateCommand.cs (3)
27private static readonly Argument<FileInfo> s_integrationArgument = new("integration") 64var integrationProject = parseResult.GetValue(s_integrationArgument)!; 112FileInfo integrationProject,
Commands\SecretCommand.cs (1)
19internal static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription);
Commands\SecretDeleteCommand.cs (1)
47var projectFile = parseResult.GetValue(SecretCommand.s_appHostOption);
Commands\SecretGetCommand.cs (1)
47var projectFile = parseResult.GetValue(SecretCommand.s_appHostOption);
Commands\SecretListCommand.cs (1)
46var projectFile = parseResult.GetValue(SecretCommand.s_appHostOption);
Commands\SecretPathCommand.cs (1)
37var projectFile = parseResult.GetValue(SecretCommand.s_appHostOption);
Commands\SecretSetCommand.cs (1)
53var projectFile = parseResult.GetValue(SecretCommand.s_appHostOption);
Commands\StartCommand.cs (1)
46var passedAppHostProjectFile = parseResult.GetValue(AppHostLauncher.s_appHostOption);
Commands\StopCommand.cs (4)
28private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", StopCommandStrings.ProjectArgumentDescription); 59var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption); 88private async Task<int> ExecuteNonInteractiveAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 126private async Task<int> ExecuteInteractiveAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken)
Commands\TelemetryCommandHelpers.cs (2)
43internal static OptionWithLegacy<FileInfo?> CreateAppHostOption() => new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 107FileInfo? projectFile,
Commands\TelemetryLogsCommand.cs (2)
35private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = TelemetryCommandHelpers.CreateAppHostOption(); 80var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\TelemetrySpansCommand.cs (2)
35private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = TelemetryCommandHelpers.CreateAppHostOption(); 76var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\TelemetryTracesCommand.cs (2)
35private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = TelemetryCommandHelpers.CreateAppHostOption(); 74var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Commands\UpdateCommand.cs (3)
36private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", UpdateCommandStrings.ProjectArgumentDescription); 145var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption); 146var projectFile = await _projectLocator.UseOrFindAppHostProjectFileAsync(passedAppHostProjectFile, createSettingsFile: true, cancellationToken);
Commands\WaitCommand.cs (2)
42private static readonly OptionWithLegacy<FileInfo?> s_appHostOption = new("--apphost", "--project", SharedCommandStrings.AppHostOptionDescription); 73var passedAppHostProjectFile = parseResult.GetValue(s_appHostOption);
Configuration\ConfigurationService.cs (1)
11internal sealed class ConfigurationService(IConfiguration configuration, CliExecutionContext executionContext, FileInfo globalSettingsFile, ILogger<ConfigurationService> logger) : IConfigurationService
DotNet\DotNetCliRunner.cs (33)
29Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 30Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 31Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 32Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 34Task<int> RestoreAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 35Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 36Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 37Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 38Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 40Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 41Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 42Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 102FileInfo? projectFile, 231public async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 314public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 415public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 490public async Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 634public async Task<int> RestoreAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 650public async Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 673public async Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 737public async Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 829public async Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 1038public async Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 1070return (exitCode, Array.Empty<FileInfo>()); 1074var projects = new List<FileInfo>(); 1104public async Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 1133public Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
NuGet\BundleNuGetPackageCache.cs (5)
43FileInfo? nugetConfigFile, 59FileInfo? nugetConfigFile, 75FileInfo? nugetConfigFile, 93FileInfo? nugetConfigFile, 111FileInfo? nugetConfigFile,
NuGet\NuGetPackageCache.cs (9)
16Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 17Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 18Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 19Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken); 32public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 47public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 52public async Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 68private static async Task<string> ComputeNuGetConfigHashSuffixAsync(FileInfo nugetConfigFile, CancellationToken cancellationToken) 76public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string query, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Packaging\NuGetConfigMerger.cs (11)
33public static async Task CreateOrUpdateAsync(DirectoryInfo targetDirectory, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback = null, CancellationToken cancellationToken = default) 50if (!TryFindNuGetConfigInDirectory(targetDirectory, out var nugetConfigFile)) 60private static async Task CreateNewNuGetConfigAsync(DirectoryInfo targetDirectory, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback, CancellationToken cancellationToken) 69var targetFile = new FileInfo(targetPath); 95private static async Task UpdateExistingNuGetConfigAsync(FileInfo nugetConfigFile, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback, CancellationToken cancellationToken) 147private static async Task<NuGetConfigContext> LoadAndValidateConfigAsync(FileInfo nugetConfigFile, PackageMapping[] mappings) 798private static async Task SaveConfigAsync(FileInfo nugetConfigFile, XDocument document) 824 if (!TryFindNuGetConfigInDirectory(targetDirectory, out var nugetConfigFile)) 923internal static bool TryFindNuGetConfigInDirectory(DirectoryInfo directory, [NotNullWhen(true)] out FileInfo? nugetConfigFile) 941private static async Task AddGlobalPackagesFolderToConfigAsync(FileInfo configFile)
Packaging\NuGetConfigPrompter.cs (1)
45var hasConfigInTargetDir = NuGetConfigMerger.TryFindNuGetConfigInDirectory(targetDirectory, out var nugetConfigFile);
Packaging\TemporaryNuGetConfig.cs (6)
10private readonly FileInfo _configFile; 13private TemporaryNuGetConfig(FileInfo configFile) 18public FileInfo ConfigFile => _configFile; 25var configFile = new FileInfo(tempFilePath); 35var configFile = new FileInfo(targetPath); 39private static async Task GenerateNuGetConfigAsync(PackageMapping[] mappings, FileInfo configFile)
Program.cs (2)
268var globalSettingsFile = new FileInfo(globalSettingsFilePath); 561var globalSettingsFile = new FileInfo(GetGlobalSettingsPath(logger));
Projects\AppHostProjectContext.cs (1)
18public required FileInfo AppHostFile { get; init; }
Projects\AppHostProjectFactory.cs (2)
42public IAppHostProject? TryGetProject(FileInfo appHostFile) 59public IAppHostProject GetProject(FileInfo appHostFile)
Projects\DefaultLanguageDiscovery.cs (1)
133public LanguageInfo? GetLanguageByFile(FileInfo file)
Projects\DotNetAppHostProject.cs (12)
87public bool CanHandle(FileInfo appHostFile) 108private static bool IsValidSingleFileAppHost(FileInfo candidateFile) 147public bool IsUsingProjectReferences(FileInfo appHostFile) 157public async Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 190private static bool IsPossiblyUnbuildableAppHost(FileInfo projectFile) 210var effectiveAppHostFile = context.AppHostFile; 356private static void ConfigureSingleFileEnvironment(FileInfo appHostFile, Dictionary<string, string> env) 381var effectiveAppHostFile = context.AppHostFile; 502public async Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 522public async Task<string?> GetUserSecretsIdAsync(FileInfo projectFile, bool autoInit, CancellationToken cancellationToken) 550private async Task<string?> QueryUserSecretsIdAsync(FileInfo projectFile, CancellationToken cancellationToken) 591FileInfo appHostFile,
Projects\DotNetBasedAppHostServerProject.cs (1)
425var projectFile = new FileInfo(Path.Combine(_projectModelPath, ProjectFileName));
Projects\ExtensionGuestLauncher.cs (2)
16private readonly FileInfo _appHostFile; 21FileInfo appHostFile,
Projects\FallbackProjectParser.cs (4)
37public JsonDocument ParseProject(FileInfo projectFile) 72private static JsonDocument ParseCsprojProjectFile(FileInfo projectFile) 97private static JsonDocument ParseCsAppHostFile(FileInfo projectFile) 248private static ProjectReferenceInfo[] ExtractProjectReferences(XElement projectRoot, FileInfo projectFile)
Projects\GuestAppHostProject.cs (10)
129public bool CanHandle(FileInfo appHostFile) 144public bool IsUsingProjectReferences(FileInfo appHostFile) 176var settingsFile = new FileInfo(settingsFilePath); 308public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 340var appHostFile = context.AppHostFile; 750var appHostFile = context.AppHostFile; 1158public async Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 1332FileInfo appHostFile, 1355FileInfo appHostFile, 1376public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken)
Projects\GuestRuntime.cs (4)
94FileInfo appHostFile, 119FileInfo appHostFile, 133FileInfo appHostFile, 165FileInfo? appHostFile,
Projects\IAppHostProject.cs (8)
26public required FileInfo AppHostFile { get; init; } 53public required FileInfo AppHostFile { get; init; } 86public required FileInfo AppHostFile { get; init; } 172bool CanHandle(FileInfo appHostFile); 185bool IsUsingProjectReferences(FileInfo appHostFile); 210Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken); 235Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken); 243Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken);
Projects\IAppHostProjectFactory.cs (2)
24IAppHostProject? TryGetProject(FileInfo appHostFile); 33IAppHostProject GetProject(FileInfo appHostFile);
Projects\ILanguageDiscovery.cs (1)
95LanguageInfo? GetLanguageByFile(FileInfo file);
Projects\ProjectLocator.cs (29)
20Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default); 21Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken); 28Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default); 42public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 48private async Task<(List<FileInfo> BuildableAppHost, List<FileInfo> UnbuildableSuspectedAppHostProjects, bool HasUnsupportedProjects)> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, CancellationToken cancellationToken) 54var appHostProjects = new List<FileInfo>(); 55var unbuildableSuspectedAppHostProjects = new List<FileInfo>(); 80var candidatesWithHandlers = new List<(FileInfo File, IAppHostProject Handler)>(); 87foreach (var candidateFile in candidateFiles) 163public async Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 168private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(CancellationToken cancellationToken) 173private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(bool silent, CancellationToken cancellationToken) 196var appHostFile = new FileInfo(qualifiedPath); 214var settingsFile = new FileInfo(ConfigurationHelper.BuildPathToSettingsJsonFile(searchDirectory.FullName)); 225var appHostFile = new FileInfo(qualifiedAppHostPath); 254public async Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 363FileInfo? selectedAppHost = null; 401public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken = default) 407private async Task CreateSettingsFileAsync(FileInfo projectFile, CancellationToken cancellationToken) 409var settingsFile = GetOrCreateLocalAspireConfigFile(); 440private FileInfo GetOrCreateLocalAspireConfigFile() 442var settingsFile = new FileInfo(configurationService.GetSettingsFilePath(isGlobal: false)); 458var aspireConfigFile = new FileInfo(Path.Combine(legacySettingsRootDirectory.FullName, AspireConfigFile.FileName)); 478private static DirectoryInfo? GetLegacySettingsRootDirectory(FileInfo settingsFile) 511internal record AppHostProjectSearchResult(FileInfo? SelectedProjectFile, List<FileInfo> AllProjectFileCandidates);
Projects\ProjectUpdater.cs (29)
23Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default); 28public async Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default) 155private async Task<(IEnumerable<UpdateStep> UpdateSteps, bool FallbackUsed)> GetUpdateStepsAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken) 172private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, CancellationToken cancellationToken) 177private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, CancellationToken cancellationToken) 197private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, UpdateContext context, CancellationToken cancellationToken) 202private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, string[] items, string[] properties, UpdateContext context, CancellationToken cancellationToken) 224private static bool IsAppHostProject(FileInfo projectFile, UpdateContext context) 289private static SdkMigrationInfo DetectMigrationActions(FileInfo projectFile) 375internal static async Task UpdateSdkVersionInAppHostAsync(FileInfo projectFile, NuGetPackageCli package, IInteractionService interactionService, SdkMigrationInfo migrationInfo) 404internal static async Task UpdateSdkVersionInCsprojAppHostAsync(FileInfo projectFile, NuGetPackageCli package) 526private static void RemovePackageVersionFromDirectoryPackagesProps(FileInfo projectFile, string packageId) 574private static async Task UpdateSdkVersionInSingleFileAppHostAsync(FileInfo projectFile, NuGetPackageCli package) 597private async Task AnalyzeProjectAsync(FileInfo projectFile, UpdateContext context, CancellationToken cancellationToken) 638var referencedProjectFile = new FileInfo(referencedProjectPath); 694private static CentralPackageManagementInfo DetectCentralPackageManagement(FileInfo projectFile) 709private async Task AnalyzePackageForTraditionalManagementAsync(string packageId, string packageVersion, FileInfo projectFile, UpdateContext context, CancellationToken cancellationToken) 731private async Task AnalyzePackageForCentralPackageManagementAsync(string packageId, FileInfo projectFile, FileInfo directoryPackagesPropsFile, UpdateContext context, CancellationToken cancellationToken) 761private async Task<string?> GetPackageVersionFromDirectoryPackagesPropsAsync(string packageId, FileInfo directoryPackagesPropsFile, FileInfo projectFile, CancellationToken cancellationToken) 831private async Task<string?> ResolveMSBuildPropertyAsync(string propertyName, FileInfo projectFile, CancellationToken cancellationToken) 861private static async Task UpdatePackageVersionInDirectoryPackagesProps(string packageId, string newVersion, FileInfo directoryPackagesPropsFile) 878private async Task UpdatePackageReferenceInProject(FileInfo projectFile, NuGetPackageCli package, CancellationToken cancellationToken) 895private async Task<bool> AnalyzeAndConfirmNuGetConfigChanges(FileInfo targetFile, XmlDocument? originalDocument, XmlDocument proposedDocument, CancellationToken cancellationToken) 1127internal sealed class UpdateContext(FileInfo appHostProjectFile, PackageChannel channel) 1129public FileInfo AppHostProjectFile { get; } = appHostProjectFile; 1154FileInfo ProjectFile) : UpdateStep(Description, Callback) 1170internal record CentralPackageManagementInfo(bool UsesCentralPackageManagement, FileInfo? DirectoryPackagesPropsFile);
Projects\SolutionLocator.cs (7)
13Task<FileInfo?> FindSolutionFileAsync(DirectoryInfo startDirectory, CancellationToken cancellationToken = default); 18public async Task<FileInfo?> FindSolutionFileAsync(DirectoryInfo startDirectory, CancellationToken cancellationToken = default) 40var selectedSolution = await interactionService.PromptForSelectionAsync( 50private static async Task<List<FileInfo>> GetSolutionFilesInDirectoryAndSubfoldersAsync(DirectoryInfo directory, CancellationToken cancellationToken) 62return new List<FileInfo>(); 75return new List<FileInfo>(); 81var solutionFiles = new List<FileInfo>();
Secrets\SecretStoreResolver.cs (3)
20FileInfo? projectFile, 30var appHostFile = searchResult.SelectedProjectFile; 61FileInfo AppHostFile);
Utils\AppHostHelper.cs (3)
17internal static async Task<(bool IsCompatibleAppHost, bool SupportsBackchannel, string? AspireHostingVersion)> CheckAppHostCompatibilityAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, DirectoryInfo workingDirectory, string logFilePath, CancellationToken cancellationToken) 53internal static async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 69internal static async Task<int> BuildAppHostAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, bool noRestore, DotNetCliRunnerInvocationOptions options, DirectoryInfo workingDirectory, CancellationToken cancellationToken)
Utils\ConfigurationHelper.cs (2)
24internal static void RegisterSettingsFiles(IConfigurationBuilder configuration, DirectoryInfo workingDirectory, FileInfo globalSettingsFile) 29FileInfo? localSettingsFile = null;
Utils\EnvironmentChecker\DotNetSdkCheck.cs (1)
95var appHostFile = await projectLocator.GetAppHostFromSettingsAsync(cancellationToken);
Utils\FileSystemHelper.cs (1)
40foreach (var file in currentSource.GetFiles())
Aspire.Cli.Tests (442)
Commands\DotNetSdkCheckTests.cs (1)
144var appHostFile = appHostFileName is not null
Commands\ExecCommandTests.cs (15)
171public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 176public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 181public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 186public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 191public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 196public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 201public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 206public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 211public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
Commands\ExtensionInternalCommandTests.cs (49)
60var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "MyApp.AppHost.csproj")); 101var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App1.AppHost.csproj")); 102var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "App2.AppHost.csproj")); 194private readonly FileInfo _projectFile; 196public SingleProjectFileProjectLocator(FileInfo projectFile) 202FileInfo? projectFile, 211public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 212FileInfo? projectFile, 216return Task.FromResult<FileInfo?>(_projectFile); 220FileInfo? projectFile, 228public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 229FileInfo? projectFile, 236public Task<FileInfo?> UseOrFindSolutionFileAsync( 237FileInfo? solutionFile, 244public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 249private readonly List<FileInfo> _projectFiles; 251public MultipleProjectsProjectLocator(List<FileInfo> projectFiles) 257FileInfo? projectFile, 266public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 267FileInfo? projectFile, 271return Task.FromResult<FileInfo?>(null); 275FileInfo? projectFile, 283public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 284FileInfo? projectFile, 291public Task<FileInfo?> UseOrFindSolutionFileAsync( 292FileInfo? solutionFile, 299public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 305FileInfo? projectFile, 313public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 314FileInfo? projectFile, 322FileInfo? projectFile, 330public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 331FileInfo? projectFile, 338public Task<FileInfo?> UseOrFindSolutionFileAsync( 339FileInfo? solutionFile, 346public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 352FileInfo? projectFile, 360public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 361FileInfo? projectFile, 369FileInfo? projectFile, 377public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 378FileInfo? projectFile, 385public Task<FileInfo?> UseOrFindSolutionFileAsync( 386FileInfo? solutionFile, 393public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
Commands\InitCommandTests.cs (16)
27var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 30var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, projectFileName)); 66var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 79return (0, Array.Empty<FileInfo>()); 164var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 192return (1, Array.Empty<FileInfo>()); 219var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 235return (0, Array.Empty<FileInfo>()); 438public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 449public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 454public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 459public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 562public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 574public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 579public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 584public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Commands\NewCommandTests.cs (13)
1613public Func<DirectoryInfo, bool, FileInfo?, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetTemplatePackagesAsyncCallback { get; set; } 1615public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 1631public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 1636public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 1641public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 1690public IAppHostProject? TryGetProject(FileInfo appHostFile) 1695public IAppHostProject GetProject(FileInfo appHostFile) 1716public bool CanHandle(FileInfo appHostFile) 1721public bool IsUsingProjectReferences(FileInfo appHostFile) 1736public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 1751public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 1756public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) 1761public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken)
Commands\RestoreCommandTests.cs (2)
18var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 52var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Commands\RunCommandTests.cs (29)
167public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 172public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 177public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 222public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 227public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 232public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 237public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 242public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 247public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 478var appHostProjectFile = new FileInfo(appHostProjectPath); 938var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 988var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1034var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1084var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1129var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1175var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1221var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1266public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 1271public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 1274return Task.FromResult<FileInfo?>(new FileInfo("/tmp/apphost.cs")); 1277public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
Commands\SecretCommandTests.cs (17)
21var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 45var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.ts")); 67FileInfo appHostFile, 83private sealed class TestProjectLocator(FileInfo appHostFile) : IProjectLocator 85public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 86=> Task.FromResult<FileInfo?>(appHostFile); 88public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 89=> Task.FromResult<FileInfo?>(projectFile ?? appHostFile); 91public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 99public IAppHostProject? TryGetProject(FileInfo appHostFile) => project; 101public IAppHostProject GetProject(FileInfo appHostFile) => project; 112public bool CanHandle(FileInfo appHostFile) => true; 113public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) => throw new NotSupportedException(); 115public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) => Task.FromResult<string?>(userSecretsId); 116public bool IsUsingProjectReferences(FileInfo appHostFile) => false; 120public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) => throw new NotSupportedException();
Commands\UpdateCommandTests.cs (11)
50return Task.FromResult<FileInfo?>(projectFile); 223return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 296return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 504return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 571return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 637return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 695return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 773return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 818return Task.FromResult<FileInfo?>(new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"))); 1084public Func<FileInfo, PackageChannel, CancellationToken, Task<ProjectUpdateResult>>? UpdateProjectAsyncCallback { get; set; } 1086public Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default)
Configuration\ConfigurationHelperTests.cs (1)
20var globalSettingsFile = new FileInfo(Path.Combine(globalDir.FullName, AspireConfigFile.FileName));
Configuration\ConfigurationServiceTests.cs (1)
18var globalSettingsFile = new FileInfo(Path.Combine(globalSettingsDir.FullName, AspireConfigFile.FileName));
DotNet\DotNetCliRunnerTests.cs (34)
32var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 72var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 101var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 129var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 168var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 197var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 226var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 264var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 305var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 383var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 423var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 465var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 512var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 560var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 613var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 680var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 746var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 819var solutionFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Test.sln")); 824var project1File = new FileInfo(Path.Combine(project1Dir.FullName, "Project1.csproj")); 828var project2File = new FileInfo(Path.Combine(project2Dir.FullName, "Project2.csproj")); 866var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 869var referencedProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Service.csproj")); 899var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 945var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 990var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1035var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1086var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1135var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1183var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 1219var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1398var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1436var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1474var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1514var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Mcp\MockPackagingService.cs (4)
37public Task<IEnumerable<NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 40public Task<IEnumerable<NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 43public Task<IEnumerable<NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 46public Task<IEnumerable<NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Packaging\NuGetConfigMergerSnapshotTests.cs (5)
27public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 28public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 29public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 30public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 45private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content)
Packaging\NuGetConfigMergerTests.cs (7)
22private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content) 31public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 35public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 39public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 43public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 561FileInfo? callbackTargetFile = null; 641FileInfo? callbackTargetFile = null;
Packaging\PackageChannelTests.cs (4)
14public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 15public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 16public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 17public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]);
Packaging\PackagingServiceTests.cs (8)
19public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 20public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 21public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 22public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 897public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 906public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 909public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 912public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Projects\AppHostServerProjectTests.cs (5)
346public Task<IEnumerable<NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 349public Task<IEnumerable<NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 352public Task<IEnumerable<NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 355public Task<IEnumerable<NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 364foreach (var file in dirInfo.GetFiles())
Projects\DefaultLanguageDiscoveryTests.cs (4)
109var file = new FileInfo(Path.Combine(Path.GetTempPath(), fileName)); 124var file = new FileInfo(Path.Combine(Path.GetTempPath(), fileName)); 135var file = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.go")); 148var file = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.go"));
Projects\ExtensionGuestLauncherTests.cs (1)
51var appHostFile = new FileInfo("/home/user/project/apphost.ts");
Projects\GuestRuntimeTests.cs (12)
74var appHostFile = new FileInfo("/tmp/apphost.ts"); 93var appHostFile = new FileInfo("/tmp/apphost.ts"); 108var appHostFile = new FileInfo("/tmp/apphost.ts"); 125var appHostFile = new FileInfo("/tmp/apphost.ts"); 140var appHostFile = new FileInfo("/tmp/apphost.ts"); 159var appHostFile = new FileInfo("/tmp/apphost.ts"); 180var appHostFile = new FileInfo("/tmp/apphost.ts"); 199var appHostFile = new FileInfo("/home/user/project/apphost.ts"); 218var appHostFile = new FileInfo("/home/user/project/apphost.ts"); 236var appHostFile = new FileInfo("/tmp/apphost.ts"); 256var appHostFile = new FileInfo("/tmp/apphost.ts"); 344var appHostFile = new FileInfo(Path.Combine(Path.GetTempPath(), "apphost.ts"));
Projects\ProjectLocatorTests.cs (72)
37var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 55var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 59var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj")); 63var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 75var foundAppHost = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 89var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 93var otherAppHostProjectFile = new FileInfo(Path.Combine(otherAppHostDirectory.FullName, "OtherAppHost.csproj")); 97var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 109var foundAppHost = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 120var realAppHostProjectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "RealAppHost.csproj")); 125var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 150var foundAppHost = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 161var targetAppHostProjectFile = new FileInfo(Path.Combine(targetAppHostDirectory.FullName, "TargetAppHost.csproj")); 165var aspireSettingsFile = new FileInfo(Path.Combine(workspaceSettingsDirectory.FullName, "settings.json")); 181var foundAppHost = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 191var projectFile1 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost1.csproj")); 194var projectFile2 = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost2.csproj")); 200var selectedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 209var appHostProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 212var webProject = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "WebProject.csproj")); 229var foundAppHost = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 255var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, $"AppHost{projectFileExtension}")); 261var returnedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(projectFile, createSettingsFile: true).DefaultTimeout(); 270var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 276var returnedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true).DefaultTimeout(); 287var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "AppHost.csproj")); 297var globalSettingsFile = new FileInfo(globalSettingsFilePath); 307var settingsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, AspireConfigFile.FileName)); 326var appHostProjectFile = new FileInfo(Path.Combine(appHostDirectory.FullName, "MyAppHost.csproj")); 331var decoyAppHostProjectFile = new FileInfo(Path.Combine(decoyAppHostDirectory.FullName, "DecoyAppHost.csproj")); 339var aspireSettingsFile = new FileInfo(Path.Combine(aspireSettingsDir.FullName, "settings.json")); 347var globalSettingsFile = new FileInfo(globalSettingsFilePath); 354var foundAppHost = await locator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true, CancellationToken.None).DefaultTimeout(); 375var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 400var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs")); 426var appHostFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "apphost.cs")); 436var csprojFile = new FileInfo(Path.Combine(dirWithBoth.FullName, "RegularProject.csproj")); 441var validAppHostFile = new FileInfo(Path.Combine(dirWithOnlyAppHost.FullName, "apphost.cs")); 481var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 501var csprojFile = new FileInfo(Path.Combine(subDir1.FullName, "AppHost.csproj")); 506var appHostFile = new FileInfo(Path.Combine(subDir2.FullName, "apphost.cs")); 542var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 555var result = await projectLocator.UseOrFindAppHostProjectFileAsync(appHostFile, createSettingsFile: true, CancellationToken.None).DefaultTimeout(); 566var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 587var appHostFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "apphost.cs")); 598var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "SomeProject.csproj")); 613var txtFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "readme.txt")); 633var csprojFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 638var appHostFile = new FileInfo(Path.Combine(subDir.FullName, "apphost.cs")); 659var result = await projectLocator.UseOrFindAppHostProjectFileAsync(null, createSettingsFile: true, CancellationToken.None).DefaultTimeout(); 726private static ProjectLocator CreateProjectLocatorWithSingleFileEnabled(CliExecutionContext executionContext, Func<FileInfo, AppHostValidationResult>? validateCallback = null) 743var projectFile = new FileInfo(Path.Combine(projectDirectory.FullName, "MyAppHost.csproj")); 762var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 763var returnedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(directoryAsFileInfo, createSettingsFile: true).DefaultTimeout(); 780var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 797var projectFile1 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project1.csproj")); 799var projectFile2 = new FileInfo(Path.Combine(projectDirectory.FullName, "Project2.csproj")); 819var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 821var returnedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(directoryAsFileInfo, createSettingsFile: true).DefaultTimeout(); 834var appHostFile = new FileInfo(Path.Combine(projectDirectory.FullName, "apphost.cs")); 848var directoryAsFileInfo = new FileInfo(projectDirectory.FullName); 849var returnedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(directoryAsFileInfo, createSettingsFile: true).DefaultTimeout(); 862var projectFile = new FileInfo(Path.Combine(subDirectory.FullName, "Mongo.AppHost.csproj")); 881var directoryAsFileInfo = new FileInfo(topDirectory.FullName); 882var returnedProjectFile = await projectLocator.UseOrFindAppHostProjectFileAsync(directoryAsFileInfo, createSettingsFile: true).DefaultTimeout(); 901var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj")); 906var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "AppHost.cs")); 944var csprojFile = new FileInfo(Path.Combine(appHostDir.FullName, "MyApp.AppHost.csproj")); 948var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs")); 986var appHostCsFile = new FileInfo(Path.Combine(appHostDir.FullName, "apphost.cs")); 1009var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj")); 1030var projectFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "AppHost.csproj"));
Projects\ProjectUpdaterTests.cs (46)
30var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 33var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 36var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 140var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 143var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 146var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 156var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>(); 271var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 274var webAppProjectFile = new FileInfo(Path.Combine(webAppFolder.FullName, "UpdateTester.WebApp.csproj")); 277var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 287var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>(); 421var sharedProjectFile = new FileInfo(Path.Combine(sharedProjectFolder.FullName, "SharedProject.csproj")); 424var projectAFile = new FileInfo(Path.Combine(projectAFolder.FullName, "ProjectA.csproj")); 427var projectBFile = new FileInfo(Path.Combine(projectBFolder.FullName, "ProjectB.csproj")); 430var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "DiamondTest.AppHost.csproj")); 440var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>(); 554var serviceDefaultsProjectFile = new FileInfo(Path.Combine(serviceDefaultsFolder.FullName, "UpdateTester.ServiceDefaults.csproj")); 557var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 559var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 690var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 692var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 792var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 794var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 903var projectFile = new FileInfo("/path/to/MyProject.csproj"); 925var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 927var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1038var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1040var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1162var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1164var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1276var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1278var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1387var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1481var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1483var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 1583var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1662var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1744var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 1827var appHostFile = new FileInfo(Path.Combine(appHostFolder.FullName, "apphost.cs")); 1909var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 1995var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2073var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2151var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2258var appHostProjectFile = new FileInfo(Path.Combine(appHostFolder.FullName, "UpdateTester.AppHost.csproj")); 2260var directoryPackagesPropsFile = new FileInfo(Path.Combine(workspace.WorkspaceRoot.FullName, "Directory.Packages.props")); 2292var packagesAddsExecuted = new List<(FileInfo ProjectFile, string PackageId, string PackageVersion, string? PackageSource, bool NoRestore)>();
Templating\DotNetTemplateFactoryTests.cs (19)
36public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 40public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 44public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 48public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 501public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 507public Task<int> RestoreAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 510public Task<int> BuildAsync(FileInfo projectFile, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 513public Task<int> AddPackageAsync(FileInfo projectFile, string packageName, string version, string? packageSourceUrl, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 516public Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 519public Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 522public Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProjectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 525public Task<(int ExitCode, NuGetPackageCli[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 528public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 531public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 534public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 540public Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
TestServices\FakeNuGetPackageCache.cs (4)
11public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 14public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 17public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 20public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
TestServices\NoProjectFileProjectLocator.cs (5)
10public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 15public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 20public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
TestServices\TestAppHostProjectFactory.cs (11)
19public Func<FileInfo, AppHostValidationResult>? ValidateAppHostCallback { get; set; } 32public IAppHostProject GetProject(FileInfo appHostFile) 37public IAppHostProject? TryGetProject(FileInfo appHostFile) 72private static bool IsValidSingleFileAppHost(FileInfo candidateFile) 121public bool IsUsingProjectReferences(FileInfo appHostFile) 129public bool CanHandle(FileInfo appHostFile) 152public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 155public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 182public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 185public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) 188private static bool IsValidSingleFileAppHost(FileInfo candidateFile)
TestServices\TestDotNetCliRunner.cs (30)
14public Func<FileInfo, string, string, string?, bool, DotNetCliRunnerInvocationOptions, CancellationToken, int>? AddPackageAsyncCallback { get; set; } 15public Func<FileInfo, FileInfo, DotNetCliRunnerInvocationOptions, CancellationToken, int>? AddProjectToSolutionAsyncCallback { get; set; } 16public Func<FileInfo, bool, DotNetCliRunnerInvocationOptions, CancellationToken, int>? BuildAsyncCallback { get; set; } 17public Func<FileInfo, DotNetCliRunnerInvocationOptions, CancellationToken, int>? RestoreAsyncCallback { get; set; } 18public Func<FileInfo, DotNetCliRunnerInvocationOptions, CancellationToken, (int ExitCode, bool IsAspireHost, string? AspireHostingVersion)>? GetAppHostInformationAsyncCallback { get; set; } 20public Func<FileInfo, string[], string[], DotNetCliRunnerInvocationOptions, CancellationToken, (int ExitCode, JsonDocument? Output)>? GetProjectItemsAndPropertiesAsyncCallback { get; set; } 23public Func<FileInfo, bool, bool, bool, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostCliBackchannel>?, DotNetCliRunnerInvocationOptions, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 24public Func<DirectoryInfo, string, bool, int, int, FileInfo?, bool, DotNetCliRunnerInvocationOptions, CancellationToken, (int ExitCode, NuGetPackage[]? Packages)>? SearchPackagesAsyncCallback { get; set; } 25public Func<FileInfo, DotNetCliRunnerInvocationOptions, CancellationToken, (int ExitCode, IReadOnlyList<FileInfo> Projects)>? GetSolutionProjectsAsyncCallback { get; set; } 26public Func<FileInfo, FileInfo, DotNetCliRunnerInvocationOptions, CancellationToken, int>? AddProjectReferenceAsyncCallback { get; set; } 28public Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 35public Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 42public Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 49public Task<int> RestoreAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 56public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 81public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 88public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 102public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 109public Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 116public Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 120: Task.FromResult<(int, IReadOnlyList<FileInfo>)>((0, Array.Empty<FileInfo>())); 123public Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 130public Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
TestServices\TestLanguageDiscovery.cs (1)
75public LanguageInfo? GetLanguageByFile(FileInfo file)
TestServices\TestProjectLocator.cs (9)
11public Func<FileInfo?, bool, CancellationToken, Task<FileInfo?>>? UseOrFindAppHostProjectFileAsyncCallback { get; set; } 13public Func<FileInfo?, MultipleAppHostProjectsFoundBehavior, bool, CancellationToken, Task<AppHostProjectSearchResult>>? UseOrFindAppHostProjectFileWithBehaviorAsyncCallback { get; set; } 15public Func<CancellationToken, Task<FileInfo?>>? GetAppHostFromSettingsAsyncCallback { get; set; } 17public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 34public async Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 42var appHostFile = await UseOrFindAppHostProjectFileAsync(projectFile, createSettingsFile, cancellationToken).DefaultTimeout(); 51public async Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default)
Utils\CliTestHelper.cs (2)
73var globalSettingsFile = new FileInfo(globalSettingsFilePath); 330private static FileInfo GetGlobalSettingsFile(DirectoryInfo workingDirectory)
Utils\CliUpdateNotificationServiceTests.cs (4)
296public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 301public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 306public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 311public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Aspire.Hosting (8)
Dcp\DcpExecutor.cs (2)
2408FileInfo filePath => filePath.FullName, 2413if (buildSecret.Value is FileInfo)
Dcp\KubernetesService.cs (1)
588var fileInfo = new FileInfo(locations.DcpKubeconfigPath);
Publishing\ManifestPublishingContext.cs (2)
435FileInfo fileValue => GetManifestRelativePath(fileValue.FullName), 445if (value is FileInfo)
Publishing\ResourceContainerImageManager.cs (2)
446var secretType = buildSecret.Value is FileInfo ? BuildImageSecretType.File : BuildImageSecretType.Environment; 498FileInfo filePath => filePath.FullName,
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
83var projectFileInfo = new FileInfo(projectMetadata.ProjectPath);
Aspire.Hosting.Azure.Functions (1)
src\Shared\LaunchProfiles\LaunchProfileExtensions.cs (1)
83var projectFileInfo = new FileInfo(projectMetadata.ProjectPath);
Aspire.Hosting.Maui (2)
Utilities\MauiEnvironmentHelper.cs (2)
162var info = new FileInfo(file); 317var info = new FileInfo(file);
Aspire.Hosting.Tests (1)
Publishing\ResourceContainerImageManagerTests.cs (1)
711var fileInfo = new FileInfo(tempFile);
BuildValidator (6)
FileNameEqualityComparer.cs (4)
11internal sealed class FileNameEqualityComparer : IEqualityComparer<FileInfo> 21public bool Equals(FileInfo? x, FileInfo? y) 24public int GetHashCode(FileInfo? file)
LocalReferenceResolver.cs (1)
73foreach (var fileInfo in allFiles)
Program.cs (1)
316var originalBinary = new FileInfo(assemblyInfo.FilePath);
dotnet-dev-certs (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
dotnet-openapi (12)
Commands\AddFileCommand.cs (1)
36var projectFilePath = ResolveProjectFile(ProjectFileOption);
Commands\AddProjectCommand.cs (1)
30var projectFilePath = ResolveProjectFile(ProjectFileOption);
Commands\AddURLCommand.cs (1)
36var projectFilePath = ResolveProjectFile(ProjectFileOption);
Commands\BaseCommand.cs (5)
95internal FileInfo ResolveProjectFile(CommandOption projectOption) 125protected static Project LoadProject(FileInfo projectFile) 147FileInfo projectFile, 190private async Task EnsurePackagesInProjectAsync(FileInfo projectFile, CodeGenerator? codeGenerator) 204private async Task TryAddPackage(string packageId, string packageVersion, FileInfo projectFile)
Commands\RefreshCommand.cs (2)
31var projectFile = ResolveProjectFile(ProjectFileOption); 39private static string FindReferenceFromUrl(FileInfo projectFile, string url)
Commands\RemoveCommand.cs (2)
31var projectFile = ResolveProjectFile(ProjectFileOption); 51private string RemoveServiceReference(string tagName, FileInfo projectFile, string sourceFile)
dotnet-svcutil.xmlserializer (9)
Microsoft\Tools\ServiceModel\SvcUtil\InputModule.cs (7)
81FileInfo[] inputFiles; 108private void LoadInputItem_AsFilePath(FileInfo[] inputFiles, string path) 111foreach (FileInfo fileInfo in inputFiles) 120private bool LoadFile(FileInfo fileInfo, ToolMode? mode) 130private bool LoadFileAsAssembly(FileInfo fileInfo) 154private static bool TryFindFiles(string path, out FileInfo[] fileInfos) 178FileInfo[] files = dirInfo.GetFiles(filename);
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
220FileInfo fileInfo = new FileInfo(value); 425var file = new FileInfo(path);
dotnet-svcutil-lib (15)
CommandProcessorOptions.cs (1)
855FileInfo assemblyFile = directoryInfo.GetFiles(reference.AssemblyName + ".*", SearchOption.AllDirectories).FirstOrDefault();
Metadata\MetadataDocumentLoader.cs (1)
217foreach (var fileInfo in fileInfoList)
Metadata\MetadataFileNameManager.cs (3)
234public static FileInfo[] ResolveFiles(string path) 258FileInfo[] fileInfoList = dirInfo.GetFiles(filename); 267public static bool TryResolveFiles(string path, out FileInfo[] fileInfoList)
Shared\Options\ApplicationOptions.cs (2)
116protected static TOptionsBase Deserialize<TOptionsBase, TSerializer>(FileInfo fileInfo, bool throwOnError = true) 130private static TOptionsBase Deserialize<TOptionsBase, TSerializer>(string jsonText, FileInfo fileInfo, bool throwOnError = true)
Shared\Options\OptionValueParser.cs (3)
58else if (valueType == typeof(FileInfo)) 60value = CreateValue<FileInfo>(() => new FileInfo(stringValue), option, stringValue); 116else if (value is FileInfo fi)
Shared\Options\UpdateOptions.cs (3)
42public FileInfo OutputFile { get { return GetValue<FileInfo>(OutputFileKey); } set { SetValue(OutputFileKey, value); } } 64new SingleValueOption<FileInfo>(OutputFileKey),
Shared\ProjectPropertyResolver.cs (1)
208var depsFileInfo = depsFiles.OrderBy(f => f.CreationTimeUtc).LastOrDefault();
Shared\Utilities\PathHelper.cs (1)
21public static string OriginalPath(this FileInfo fileInfo)
dotnet-svcutil-lib.Tests (3)
FileUtil.cs (2)
25FileInfo[] files = dir.GetFiles(); 26foreach (FileInfo file in files)
TestInit.cs (1)
563FileInfo nugetFile = binDirectory.GetFiles("dotnet-svcutil-lib.*.nupkg", SearchOption.AllDirectories).Where(f => !f.Name.Contains("symbols")).OrderByDescending(f => f.LastWriteTime).FirstOrDefault();
GenerateDocumentationAndConfigFiles (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
IIS.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (2)
213foreach (var file in new DirectoryInfo(from).GetFiles()) 263foreach (FileInfo fileInfo in source.GetFiles())
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
89foreach (FileInfo fileInfo in source.GetFiles())
IIS.LongTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
89foreach (FileInfo fileInfo in source.GetFiles())
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1571foreach (var fileSystemInfo in source.GetFiles())
IIS.NewHandler.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
89foreach (FileInfo fileInfo in source.GetFiles())
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1571foreach (var fileSystemInfo in source.GetFiles())
IIS.ShadowCopy.Tests (9)
ShadowCopyTests.cs (8)
31foreach (var fileInfo in directoryInfo.GetFiles()) 57foreach (var fileInfo in directoryInfo.GetFiles()) 91foreach (var fileInfo in directoryInfo.GetFiles()) 123foreach (var file in dirInfo.EnumerateFiles()) 159var dll = subDir.GetFiles("*.dll", SearchOption.AllDirectories).FirstOrDefault(); 415var fileInfo = new FileInfo(filePath) 449FileInfo[] files = dir.GetFiles(); 450foreach (FileInfo file in files)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
89foreach (FileInfo fileInfo in source.GetFiles())
IISExpress.FunctionalTests (4)
src\Servers\IIS\IIS\test\Common.FunctionalTests\GlobalVersionTests.cs (2)
213foreach (var file in new DirectoryInfo(from).GetFiles()) 263foreach (FileInfo fileInfo in source.GetFiles())
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
89foreach (FileInfo fileInfo in source.GetFiles())
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1571foreach (var fileSystemInfo in source.GetFiles())
illink (3)
Metrics (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Metrics.Legacy (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
82foreach (FileInfo file in source.GetFiles())
Microsoft.AspNetCore.DataProtection.Extensions.Tests (1)
DataProtectionProviderTests.cs (1)
74var file = new FileInfo(newFileName);
Microsoft.AspNetCore.DataProtection.Tests (3)
Repositories\FileSystemXmlRepositoryTests.cs (3)
81var fileInfo = fileInfos.Single(); // only one file should've been created 111var fileInfo = fileInfos.Single(); // only one file should've been created 314var fileInfo = Assert.Single(dirInfo.GetFiles());
Microsoft.AspNetCore.DeveloperCertificates.XPlat (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Microsoft.AspNetCore.FunctionalTests (1)
WebHostFunctionalTests.cs (1)
242var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "DefaultBuilder.slnf"));
Microsoft.AspNetCore.Http (1)
SendFileFallback.cs (1)
25var fileInfo = new FileInfo(filePath);
Microsoft.AspNetCore.Http.Results (2)
PhysicalFileHttpResult.cs (2)
166var fileInfo = new FileInfo(path); 172fileInfo = (FileInfo?)fileInfo.ResolveLinkTarget(returnFinalTarget: true) ?? fileInfo;
Microsoft.AspNetCore.HttpLogging (2)
FileLoggerProcessor.cs (2)
189var fileInfo = new FileInfo(fullName); 287foreach (var item in files)
Microsoft.AspNetCore.InternalTesting (2)
TestPathUtilities.cs (2)
19var projectFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, $"{solution}.slnf")); 30foreach (var solutionFileInfo in directoryInfo.EnumerateFiles($"{solution}.slnf", SearchOption.AllDirectories))
Microsoft.AspNetCore.InternalTesting.Tests (1)
AssemblyTestLogTests.cs (1)
300var testLog = Assert.Single(testLogFiles);
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\PhysicalFileResultExecutor.cs (2)
125var fileInfo = new FileInfo(path); 131fileInfo = (FileInfo?)fileInfo.ResolveLinkTarget(returnFinalTarget: true) ?? fileInfo;
Microsoft.AspNetCore.Mvc.Testing (1)
WebApplicationFactory.cs (1)
527var depsFile = new FileInfo(Path.Combine(AppContext.BaseDirectory, depsFileName));
Microsoft.AspNetCore.Razor.Language.UnitTests (6)
DefaultRazorProjectItemTest.cs (6)
20var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 40var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 53var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 66var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml")); 79var fileInfo = new FileInfo(Path.Combine(TestFolder, "Views", "FileDoesNotExist.cshtml")); 93var fileInfo = new FileInfo(Path.Combine(TestFolder, "Home.cshtml"));
Microsoft.AspNetCore.Razor.Test.Common (1)
Language\TestProject.cs (1)
171var fileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, fileName));
Microsoft.AspNetCore.Server.IntegrationTesting (2)
CachingApplicationPublisher.cs (1)
67foreach (FileInfo fileInfo in source.GetFiles())
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
287foreach (var file in files)
Microsoft.AspNetCore.Server.Kestrel.Core (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Microsoft.AspNetCore.Shared.Tests (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Microsoft.Build (5)
BackEnd\Components\Scheduler\Scheduler.cs (2)
1128System.IO.FileInfo f = new FileInfo(_configCache[unscheduledRequest.BuildRequest.ConfigurationId].ProjectFullPath); 1170System.IO.FileInfo f = new FileInfo(_configCache[unscheduledRequest.BuildRequest.ConfigurationId].ProjectFullPath);
Construction\ProjectRootElement.cs (2)
1567FileInfo fileInfo = FileUtilities.GetFileInfoNoThrow(_projectFileLocation.File); 1981FileInfo fileInfo = new FileInfo(path);
Evaluation\ProjectRootElementCache.cs (1)
182FileInfo fileInfo = FileUtilities.GetFileInfoNoThrow(projectFile);
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\ProjectItem_Tests.cs (1)
324FileInfo info = new FileInfo(path);
Microsoft.Build.Engine.UnitTests (7)
BackEnd\TargetBuilder_Tests.cs (6)
224var fileA = new FileInfo(files.CreatedFiles[0]); 225var fileB = new FileInfo(files.CreatedFiles[1]); 226var fileC = new FileInfo(files.CreatedFiles[2]); 268var fileA = new FileInfo(files.CreatedFiles[0]); 269var fileB = new FileInfo(files.CreatedFiles[1]); 270var fileC = new FileInfo(files.CreatedFiles[2]);
FileLogger_Tests.cs (1)
376var result = new FileInfo(logFile);
Microsoft.Build.Framework (9)
BuildEnvironmentHelper.cs (1)
546FileInfo currentMSBuildExeFile = null;
FileUtilities.cs (3)
453FileInfo file = new(testFilePath); 1202internal static FileInfo? GetFileInfoNoThrow(string filePath) 1206FileInfo fileInfo;
FileUtilities_TempFiles.cs (1)
215foreach (var fileInfo in sourceInfo.GetFiles())
ItemSpecModifiers.cs (4)
583=> TryGetFileInfo(itemSpec, out FileInfo? info) 588=> TryGetFileInfo(itemSpec, out FileInfo? info) 593=> TryGetFileInfo(itemSpec, out FileInfo? info) 597private static bool TryGetFileInfo(string itemSpec, [NotNullWhen(true)] out FileInfo? result)
Microsoft.Build.Framework.UnitTests (2)
FileUtilities_Tests.cs (2)
195FileInfo info = FileUtilities.GetFileInfoNoThrow(file); 210FileInfo info = FileUtilities.GetFileInfoNoThrow("this_file_is_nonexistent");
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
306FileInfo actualPdbInfo = new FileInfo(actualPdb); 314FileInfo desiredPdbInfo = new FileInfo(desiredLocation);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Compilers\Core\MSBuildTask\Vbc.cs (2)
306FileInfo actualPdbInfo = new FileInfo(actualPdb); 314FileInfo desiredPdbInfo = new FileInfo(desiredLocation);
Microsoft.Build.Tasks.Core (14)
BootstrapperUtil\BootstrapperBuilder.cs (3)
225var fi = new FileInfo(de.Value); 1514var fi = new FileInfo(packageFileSource.Value); 1620var fi = new FileInfo(filePath);
DependencyFile.cs (1)
86FileInfo info = FileUtilities.GetFileInfoNoThrow(filename);
DownloadFile.cs (2)
185var destinationFile = new FileInfo(Path.Combine(destinationDirectory.FullName, filename)); 353private bool ShouldSkip(HttpResponseMessage response, FileInfo destinationFile)
FileState.cs (1)
144var fileInfo = new FileInfo(_filename);
ManifestUtil\Util.cs (1)
220FileInfo fi = new FileInfo(path);
Move.cs (1)
200var info = new FileInfo(file);
ResGenDependencies.cs (1)
373var outputFile = new FileInfo(FileUtilities.FixFilePath(outputFileName));
Unzip.cs (3)
192FileInfo destinationPath = new(fullDestinationPath); 322/// <param name="fileInfo">A <see cref="FileInfo"/> object containing information about the destination file.</param> 324private bool ShouldSkipEntry(ZipArchiveEntry zipArchiveEntry, FileInfo fileInfo)
ZipDirectory.cs (1)
76FileInfo destinationFile = new FileInfo(destinationFileAbsolutePath);
Microsoft.Build.Tasks.UnitTests (31)
ConvertToAbsolutePath_Tests.cs (3)
26FileInfo testFile = new FileInfo(fileName); 58FileInfo testFile = new FileInfo(fileName); 88FileInfo testFile = new FileInfo(fileName);
Copy_Tests.cs (2)
607FileInfo sourcefi = new FileInfo(source); 610FileInfo destinationfi = new FileInfo(destination);
DownloadFile_Tests.cs (3)
79FileInfo file = new FileInfo(Path.Combine(folder.Path, "foo.txt")); 125FileInfo file = new FileInfo(Path.Combine(folder.Path, filename)); 160FileInfo file = new FileInfo(Path.Combine(folder.Path, filename));
FileStateTests.cs (12)
68FileInfo info = new FileInfo(file); 87FileInfo info = new FileInfo(file); 114FileInfo info = new FileInfo(file); 133FileInfo info = new FileInfo(file); 152FileInfo info = new FileInfo(file); 171FileInfo info = new FileInfo(file); 190FileInfo info = new FileInfo(file); 216FileInfo info = new FileInfo(file); 242FileInfo info = new FileInfo(file); 268FileInfo info = new FileInfo(file); 296FileInfo info = new FileInfo(file); 321FileInfo info = new FileInfo(file);
FindUnderPath_Tests.cs (3)
99private static void RunTask(FindUnderPath t, out FileInfo testFile, out bool success) 132FileInfo testFile; 155FileInfo testFile;
Move_Tests.cs (7)
33FileInfo file = new FileInfo(sourceFile); 79FileInfo file = new FileInfo(sourceFile); 107FileInfo file = new FileInfo(sourceFile); 225FileInfo file = new FileInfo(destinationFile); 252FileInfo file = new FileInfo(destinationFile); 334FileInfo file = new FileInfo(destinationFile); 389FileInfo file = new FileInfo(destinationFile);
PortableTasks_Tests.cs (1)
56foreach (var file in ProjectFileFolder.GetFiles())
Microsoft.Build.UnitTests.Shared (2)
EnvironmentProvider.cs (1)
91FileInfo fi = new FileInfo(dotnetExeFromPath);
TestEnvironment.cs (1)
549foreach (FileInfo file in newFiles.Except(_originalFiles).Select(f => new FileInfo(f)))
Microsoft.CodeAnalysis (5)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (2)
280foreach (var file in directory.EnumerateFiles(searchPattern: "*", searchOption: SearchOption.AllDirectories)) 286private static void ClearReadOnlyFlagOnFile(FileInfo fileInfo)
FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Analyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.CSharp.Features (1)
SyncedSource\FileBasedPrograms\ProjectLocator.cs (1)
37FileInfo[] files = dir.GetFiles("*proj");
Microsoft.CodeAnalysis.Features (21)
EmbeddedLanguages\StackFrame\StackFrameLexer.cs (2)
232/// Uses <see cref="FileInfo"/> as a tool to determine if the path is correct for returning. 263var fileInfo = new FileInfo(str);
MetadataAsSource\MetadataAsSourceFileService.cs (1)
151foreach (var fileInfo in new DirectoryInfo(directoryPath).EnumerateFiles("*", SearchOption.AllDirectories))
SymbolSearch\Windows\IIOService.cs (1)
16void Delete(FileInfo file);
SymbolSearch\Windows\SymbolSearchUpdateEngine.IOService.cs (1)
16public void Delete(FileInfo file) => file.Delete();
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (16)
182var databaseFileInfo = new FileInfo( 227private async Task<TimeSpan> DownloadFullDatabaseAsync(FileInfo databaseFileInfo, CancellationToken cancellationToken) 233private async Task<(bool succeeded, TimeSpan delay)> DownloadFullDatabaseWorkerAsync(FileInfo databaseFileInfo, CancellationToken cancellationToken) 250FileInfo databaseFileInfo, XElement element, CancellationToken cancellationToken) 304private async Task WriteDatabaseTextFileAsync(FileInfo databaseFileInfo, byte[] bytes, CancellationToken cancellationToken) 313private async Task WriteDatabaseBinaryFileAsync(AddReferenceDatabase database, FileInfo databaseFileInfo, CancellationToken cancellationToken) 333var databaseBinaryFileInfo = GetBinaryFileInfo(databaseFileInfo); 339private async Task WriteDatabaseFileAsync(FileInfo databaseFileInfo, ArraySegment<byte> bytes, CancellationToken cancellationToken) 386private static FileInfo GetBinaryFileInfo(FileInfo databaseFileInfo) 389private async Task<TimeSpan> PatchLocalDatabaseAsync(FileInfo databaseFileInfo, CancellationToken cancellationToken) 437Stream GetDatabaseStream(FileInfo databaseFileInfo, out bool isBinary) 439var databaseBinaryFileInfo = GetBinaryFileInfo(databaseFileInfo); 471FileInfo databaseFileInfo, XElement patchElement, Func<byte[]> getDatabaseBytes, CancellationToken cancellationToken) 495FileInfo databaseFileInfo, XElement patchElement, Func<byte[]> getDatabaseBytes, CancellationToken cancellationToken) 504var databaseBinaryFileInfo = GetBinaryFileInfo(databaseFileInfo);
Microsoft.CodeAnalysis.InteractiveHost (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
ExportProviderBuilderTests.cs (1)
143var fileInfo = new FileInfo(tempFile.Path);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\DefaultRazorProjectItem.cs (4)
12private FileInfo _fileInfo; 23/// <param name="file">The <see cref="FileInfo"/>.</param> 25public DefaultRazorProjectItem(string basePath, string filePath, string relativePhysicalPath, RazorFileKind? fileKind, FileInfo file, string cssScope) 55public FileInfo File => _fileInfo ??= new(FilePath);
Microsoft.CodeAnalysis.Remote.Razor (1)
RemoteMefComposition.cs (1)
144foreach (var fileInfo in directoryInfo.EnumerateFiles())
Microsoft.CodeAnalysis.Remote.Workspaces (1)
ExportProviderBuilder.cs (1)
177foreach (var fileInfo in directoryInfo.EnumerateFiles())
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (2)
194foreach (var fileInfo in directoryInfo.EnumerateFiles(searchPattern: "*", searchOption: SearchOption.AllDirectories)) 208private static void StripReadOnlyAttributeFromFile(FileInfo fileInfo)
Microsoft.CodeAnalysis.Test.Utilities (1)
AssemblyLoadTestFixture.cs (1)
547var fileInfo = new FileInfo(tempFile.Path);
Microsoft.CodeAnalysis.Workspaces (5)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (2)
280foreach (var file in directory.EnumerateFiles(searchPattern: "*", searchOption: SearchOption.AllDirectories)) 286private static void ClearReadOnlyFlagOnFile(FileInfo fileInfo)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NetCoreTests.cs (1)
121var buildLogInfo = new FileInfo(buildLogPath);
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\BaseTestClass.cs (1)
55var currentAssemblyLocation = new FileInfo(typeof(BaseTestClass).Assembly.Location);
Microsoft.DotNet.Build.Tasks.Feed (3)
src\PublishArtifactsInManifestBase.cs (2)
800FileInfo pdbStagingPath = new(Path.Combine(pdbStagePath, subPath)); 828FileInfo looseFileStagePath = new(Path.Combine(pdbStagePath, relativePath));
src\PushToBuildStorage.cs (1)
564FileInfo destFile = new(destFileName);
Microsoft.DotNet.Build.Tasks.Packaging.Tests (1)
PackageIndexTests.cs (1)
56var newFileInfo = new FileInfo(packageIndexFile);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Swix\MsiSwixProject.wix.cs (1)
112FileInfo fileInfo = new(_msi.ItemSpec);
Microsoft.DotNet.Helix.JobSender (6)
Payloads\ArchivePayload.cs (3)
17public FileInfo Archive { get; } 36var alreadyUploadedFile = new FileInfo($"{Archive.FullName}.payload"); 51private bool IsUpToDate(FileInfo alreadyUploadedFile)
Payloads\DirectoryPayload.cs (3)
46var alreadyUploadedFile = new FileInfo(basePath + ".payload"); 58foreach (FileInfo file in DirectoryInfo.EnumerateFiles("*", SearchOption.AllDirectories)) 80private bool IsUpToDate(FileInfo alreadyUploadedFile)
Microsoft.DotNet.Helix.Sdk (1)
CommandPayload.cs (1)
56var scriptFile = new FileInfo(Path.Combine(Directory.FullName, name));
Microsoft.DotNet.Open.Api.Tools.Tests (10)
OpenApiAddFileTests.cs (6)
85var csproj = new FileInfo(project.Project.Path); 118var csproj = new FileInfo(project.Project.Path); 138var csproj = new FileInfo(project.Project.Path); 158var csproj = new FileInfo(project.Project.Path); 178var csproj = new FileInfo(project.Project.Path); 203var csproj = new FileInfo(project.Project.Path);
OpenApiAddURLTests.cs (1)
408var csproj = new FileInfo(project.Project.Path);
OpenApiRemoveTests.cs (3)
32var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 75var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj")); 177var csproj = new FileInfo(Path.Join(_tempDir.Root, "testproj.csproj"));
Microsoft.DotNet.RemoteExecutor (1)
RemoteInvokeHandle.cs (1)
229FileInfo exceptionFileInfo = new FileInfo(Options.ExceptionFile);
Microsoft.DotNet.SignTool (2)
src\BatchSignUtil.cs (2)
247FileInfo fileInfo = new FileInfo(file.FullPath); 638var fileInfo = new FileInfo(sigFilePath);
Microsoft.DotNet.SignTool.Tests (3)
SignToolTests.cs (3)
461var fileInfo = new FileInfo(layoutPath); 530var fileInfo = new FileInfo(layoutPath); 576var fileInfo = new FileInfo(layoutPath);
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Program.cs (1)
108var file = new FileInfo(fullPath);
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Languages\Language.cs (1)
41var file = new FileInfo(path);
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
GenerateSwaggerCode.cs (1)
86var file = new FileInfo(fullPath);
Microsoft.Extensions.AI.Evaluation.Console (2)
Commands\ReportCommand.cs (1)
30FileInfo outputFile,
Program.cs (1)
98var outputOpt = new Option<FileInfo>(
Microsoft.Extensions.AI.Evaluation.Reporting (14)
Storage\DiskBasedResultStore.cs (14)
59IEnumerable<FileInfo> resultFiles = 62foreach (FileInfo resultFile in resultFiles) 97var resultFile = new FileInfo(Path.Combine(resultDir.FullName, $"{result.IterationName}.json")); 142var resultFile = 152IEnumerable<FileInfo> resultFiles = 155foreach (FileInfo resultFile in resultFiles) 228IEnumerable<FileInfo> resultFiles = 231foreach (FileInfo resultFile in resultFiles) 306private static IEnumerable<FileInfo> EnumerateResultFiles( 318IEnumerable<FileInfo> resultFiles = 323foreach (FileInfo resultFile in resultFiles) 332var resultFile = new FileInfo(Path.Combine(scenarioDir.FullName, $"{iterationName}.json")); 341private IEnumerable<FileInfo> EnumerateResultFiles( 352IEnumerable<FileInfo> resultFiles = EnumerateResultFiles(scenarioDirs, iterationName, cancellationToken);
Microsoft.Extensions.AI.Templates.Tests (1)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
82foreach (FileInfo file in source.GetFiles())
Microsoft.Extensions.ApiDescription.Client.Tests (4)
TargetTest.cs (4)
38foreach (var file in directory.GetFiles()) 43foreach (var file in directory.GetFiles()) 50foreach (var file in directory.GetFiles()) 57foreach (var file in directory.GetFiles("Microsoft.Extensions.ApiDescription.Client.???"))
Microsoft.Extensions.DataIngestion (3)
IngestionPipeline.cs (3)
107public async IAsyncEnumerable<IngestionResult> ProcessAsync(IEnumerable<FileInfo> files, [EnumeratorCancellation] CancellationToken cancellationToken = default) 128private async IAsyncEnumerable<IngestionResult> ProcessAsync(IEnumerable<FileInfo> files, Activity? rootActivity, 141foreach (FileInfo fileInfo in files)
Microsoft.Extensions.DataIngestion.Abstractions (3)
IngestionDocumentReader.cs (3)
25public Task<IngestionDocument> ReadAsync(FileInfo source, CancellationToken cancellationToken = default) 40public virtual async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default) 59private static string GetMediaType(FileInfo source) =>
Microsoft.Extensions.DataIngestion.Markdig (1)
MarkdownReader.cs (1)
17public override async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.DataIngestion.MarkItDown (4)
MarkItDownMcpReader.cs (1)
36public override async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default)
MarkItDownReader.cs (3)
19private readonly FileInfo? _exePath; 27public MarkItDownReader(FileInfo? exePath = null, bool extractImages = false) 34public override async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default)
Microsoft.Extensions.DataIngestion.Tests (8)
IngestionPipelineTests.cs (3)
25private readonly FileInfo _withTable; 26private readonly FileInfo _withImage; 27private readonly IReadOnlyList<FileInfo> _sampleFiles;
Readers\DocumentReaderConformanceTests.cs (4)
94FileInfo inputFile = await DownloadToFileAsync(new Uri(source)); 114FileInfo inputFile = await DownloadToFileAsync(source); 179protected static async Task<FileInfo> DownloadToFileAsync(Uri uri) 192FileInfo file = new(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + extension));
Readers\MarkItDownMcpReaderTests.cs (1)
45var nonExistentFile = new FileInfo(Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (48)
Linux\Disk\DiskStatsReader.cs (1)
18private static readonly FileInfo _diskStatsFile = new("/proc/diskstats");
Linux\IFileSystem.cs (5)
20bool Exists(FileInfo fileInfo); 34int Read(FileInfo file, int length, Span<char> destination); 39void ReadAll(FileInfo file, BufferWriter<char> destination); 44void ReadFirstLine(FileInfo file, BufferWriter<char> destination); 52IEnumerable<ReadOnlyMemory<char>> ReadAllByLines(FileInfo file, BufferWriter<char> destination);
Linux\LinuxUtilizationParserCgroupV1.cs (10)
25private static readonly FileInfo _cpuCfsQuotaUs = new("/sys/fs/cgroup/cpu/cpu.cfs_quota_us"); 30private static readonly FileInfo _cpuCfsPeriodUs = new("/sys/fs/cgroup/cpu/cpu.cfs_period_us"); 39private static readonly FileInfo _procStat = new("/proc/stat"); 44private static readonly FileInfo _memInfo = new("/proc/meminfo"); 49private static readonly FileInfo _cpuSetCpus = new("/sys/fs/cgroup/cpuset/cpuset.cpus"); 54private static readonly FileInfo _memoryLimitInBytes = new("/sys/fs/cgroup/memory/memory.limit_in_bytes"); 62private static readonly FileInfo _memoryUsageInBytes = new("/sys/fs/cgroup/memory/memory.usage_in_bytes"); 71private static readonly FileInfo _memoryStat = new("/sys/fs/cgroup/memory/memory.stat"); 80private static readonly FileInfo _cpuacctUsage = new("/sys/fs/cgroup/cpuacct/cpuacct.usage"); 85private static readonly FileInfo _cpuPodWeight = new("/sys/fs/cgroup/cpu/cpu.shares");
Linux\LinuxUtilizationParserCgroupV2.cs (23)
35private static readonly FileInfo _cpuCfsQuaotaPeriodUs = new("/sys/fs/cgroup/cpu.max"); 44private static readonly FileInfo _procStat = new("/proc/stat"); 49private static readonly FileInfo _memInfo = new("/proc/meminfo"); 55private static readonly FileInfo _cpuSetCpus = new("/sys/fs/cgroup/cpuset.cpus.effective"); 60private static readonly FileInfo _memoryLimitInBytes = new("/sys/fs/cgroup/memory.max"); 68private static readonly FileInfo _memoryUsageInBytes = new("/sys/fs/cgroup/memory.current"); 77private static readonly FileInfo _memoryStat = new("/sys/fs/cgroup/memory.stat"); 86private static readonly FileInfo _cpuacctUsage = new("/sys/fs/cgroup/cpu.stat"); 91private static readonly FileInfo _cpuPodWeight = new("/sys/fs/cgroup/cpu.weight"); 93private static readonly FileInfo _cpuCgroupInfoFile = new("/proc/self/cgroup"); 154FileInfo cpuUsageFile = new(GetCgroupPath(CpuStat)); 227FileInfo cpuLimitsFile = new(GetCgroupPath(CpuLimit)); 238FileInfo cpuLimitsFile = new(GetCgroupPath(CpuLimit)); 262FileInfo cpuRequestsFile = new(GetCgroupPath(CpuRequest)); 319FileInfo memoryUsageInBytesFile = new(Path.Combine(path, "memory.current")); 520FileInfo memoryMinFile = new(GetCgroupPath(MemoryMin)); 541FileInfo memoryLowFile = new(GetCgroupPath(MemoryLow)); 562private static (long cpuUsageNanoseconds, long nrPeriods) ParseCpuUsageFromFile(IFileSystem fileSystem, FileInfo cpuUsageFile) 656private static bool TryGetCpuLimitFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 667private static bool TryParseCpuQuotaAndPeriodFromFile(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 708private static long GetCpuPeriodsIntervalFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile) 787private static bool TryGetCgroupRequestCpuV2(IFileSystem fileSystem, FileInfo cpuRequestsFile, out float cpuUnits) 798private static bool TryParseCpuWeightFromFile(IFileSystem fileSystem, FileInfo cpuWeightFile, out float cpuUnits)
Linux\Network\LinuxNetworkUtilizationParser.cs (3)
23private static readonly FileInfo _tcp = new("/proc/net/tcp"); 28private static readonly FileInfo _tcp6 = new("/proc/net/tcp6"); 138private TcpStateInfo GetTcpStateInfo(FileInfo file)
Linux\OSFileSystem.cs (6)
23public bool Exists(FileInfo fileInfo) 34public int Read(FileInfo file, int length, Span<char> destination) 44public void ReadFirstLine(FileInfo file, BufferWriter<char> destination) 47public void ReadAll(FileInfo file, BufferWriter<char> destination) 50public IEnumerable<ReadOnlyMemory<char>> ReadAllByLines(FileInfo file, BufferWriter<char> destination) 114private static void ReadUntilTerminatorOrEnd(FileInfo file, BufferWriter<char> destination, byte? terminator)
Microsoft.Extensions.FileProviders.Physical (11)
Internal\FileSystemInfoHelper.cs (2)
35var fileInfo = new FileInfo(filePath); 48public static DateTime? GetFileLinkTargetLastWriteTimeUtc(FileInfo fileInfo)
PhysicalDirectoryInfo.cs (1)
94FileInfo file => new PhysicalFileInfo(file),
PhysicalFileInfo.cs (4)
14private readonly FileInfo _info; 17/// Initializes a new instance of the <see cref="PhysicalFileInfo"/> class that wraps an instance of <see cref="System.IO.FileInfo"/>. 19/// <param name="info">The <see cref="System.IO.FileInfo"/>.</param> 20public PhysicalFileInfo(FileInfo info)
PhysicalFileProvider.cs (1)
279var fileInfo = new FileInfo(fullPath);
PollingFileChangeToken.cs (3)
25private readonly FileInfo _fileInfo; 37/// <param name="fileInfo">The <see cref="FileInfo"/> containing the path to poll.</param> 38public PollingFileChangeToken(FileInfo fileInfo)
Microsoft.Extensions.FileSystemGlobbing (8)
Abstractions\DirectoryInfoWrapper.cs (1)
60yield return new FileInfoWrapper((FileInfo)fileSystemInfo);
Abstractions\FileInfoWrapper.cs (7)
10/// Wraps an instance of <see cref="System.IO.FileInfo" /> to provide implementation of <see cref="FileInfoBase" />. 14private readonly FileInfo _fileInfo; 17/// Initializes a new instance of the <see cref="FileInfoWrapper" /> class to wrap the specified <see cref="System.IO.FileInfo" />. 19/// <param name="fileInfo">The <see cref="System.IO.FileInfo" /></param> 20public FileInfoWrapper(FileInfo fileInfo) 31/// Equals the value of <see cref="System.IO.FileInfo.Name" />. 47/// Equals the value of <see cref="System.IO.FileInfo.Directory" />.
Microsoft.Extensions.Logging.AzureAppServices (2)
FileLoggerProvider.cs (2)
46var fileInfo = new FileInfo(fullName); 83foreach (var item in files)
Microsoft.Maui.Resizetizer (7)
CreatePartialInfoPlistTask.cs (1)
47 var fontFile = new FileInfo(font.ItemSpec);
ResizeImageInfo.cs (2)
81 var fileInfo = new FileInfo(image.GetMetadata("FullPath")); 120 var fgFileInfo = new FileInfo(fgFile);
Resizer.cs (4)
56 var fileInfo = new FileInfo(destination); 80 var fileIn = new FileInfo(inputFile); 81 var fileOut = new FileInfo(outputFile); 82 var fileInputs = inputsFile is null ? null : new FileInfo(inputsFile);
Microsoft.McpServer.ProjectTemplates.Tests (1)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
82foreach (FileInfo file in source.GetFiles())
Microsoft.ML.AutoML (9)
Experiment\ModelContainer.cs (2)
12private readonly FileInfo _fileInfo; 21internal ModelContainer(MLContext mlContext, FileInfo fileInfo, ITransformer model, DataViewSchema modelInputSchema)
Experiment\Runners\CrossValRunner.cs (1)
55var modelFileInfo = RunnerUtil.GetModelFileInfo(modelDirectory, iterationNum, i + 1);
Experiment\Runners\CrossValSummaryRunner.cs (1)
60var modelFileInfo = RunnerUtil.GetModelFileInfo(modelDirectory, iterationNum, i + 1);
Experiment\Runners\RunnerUtil.cs (2)
22FileInfo modelFileInfo, 54public static FileInfo GetModelFileInfo(DirectoryInfo modelDirectory, int iterationNum, int foldNum)
Experiment\Runners\TrainValidateRunner.cs (2)
49var modelFileInfo = GetModelFileInfo(modelDirectory, iterationNum); 62private static FileInfo GetModelFileInfo(DirectoryInfo modelDirectory, int iterationNum)
Utils\UserInputValidationUtil.cs (1)
171var fileInfo = new FileInfo(path);
Microsoft.ML.AutoML.Tests (1)
DatasetUtil.cs (1)
212var fileInfo = new FileInfo(relativeFilePath);
Microsoft.ML.IntegrationTests (1)
IntegrationTestBaseClass.cs (1)
47var currentAssemblyLocation = new FileInfo(typeof(IntegrationTestBaseClass).Assembly.Location);
Microsoft.ML.PerformanceTests (2)
Harness\ProjectGenerator.cs (1)
68var csproj = GetProjectFilePath(buildPartition.RepresentativeBenchmarkCase.Descriptor.Type, logger);
ImageClassificationBench.cs (1)
208FileInfo dataRoot = new FileInfo(typeof(
Microsoft.ML.Samples (4)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
309FileInfo _dataRoot = new FileInfo(typeof(
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
350FileInfo _dataRoot = new FileInfo(typeof(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
306FileInfo _dataRoot = new FileInfo(typeof(
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
327FileInfo _dataRoot = new FileInfo(typeof(
Microsoft.ML.Samples.GPU (4)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
309FileInfo _dataRoot = new FileInfo(typeof(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
350FileInfo _dataRoot = new FileInfo(typeof(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
306FileInfo _dataRoot = new FileInfo(typeof(
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
327FileInfo _dataRoot = new FileInfo(typeof(
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
374foreach (FileInfo file in dirInfo.GetFiles())
Microsoft.ML.TestFramework (3)
BaseTestClass.cs (1)
55var currentAssemblyLocation = new FileInfo(typeof(BaseTestClass).Assembly.Location);
CopyAction.cs (2)
26FileInfo file = new FileInfo(oldPath); 27FileInfo destFile = new FileInfo(newPath);
Microsoft.ML.Tokenizers.Data.Tests (1)
test\Microsoft.ML.Tokenizers.Tests\Utils.cs (1)
25var fileInfo = new FileInfo(fileName);
Microsoft.ML.Tokenizers.Tests (1)
Utils.cs (1)
25var fileInfo = new FileInfo(fileName);
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\FileSystem.vb (2)
381Dim files() As FileInfo 382Dim file As FileInfo
Microsoft.VisualBasic.Tests (2)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (2)
370var FileInfoFromSystemIO = new FileInfo(TestFile); 373var info = _fileSystem.GetFileInfo(TestFile);
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\AnalyzersCommandHandler.cs (1)
478var fileInfo = new FileInfo(pathToRuleSet);
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
322[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileInfo))]
netstandard (1)
netstandard.cs (1)
917[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileInfo))]
PresentationBuildTasks (2)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (2)
198foreach (FileInfo temporaryProjectFile in intermediateOutputPath.EnumerateFiles($"{tempProjPrefix}*")) 313foreach (FileInfo temporaryProjectFile in intermediateOutputPath.EnumerateFiles($"{Path.GetFileNameWithoutExtension(TemporaryTargetAssemblyProjectName)}*"))
PresentationFramework (1)
MS\Internal\IO\Packaging\XpsFilter.cs (1)
638FileInfo fi = new FileInfo(filePath);
PresentationUI (4)
MS\Internal\Documents\Application\DocumentProperties.cs (2)
345FileInfo fileInfo = new FileInfo(filePath); 414private FileInfo _fileInfo;
MS\Internal\Documents\Application\DocumentStream.cs (1)
531FileInfo originalInfo = new FileInfo(original);
MS\Internal\Documents\RMPublishingDialog.cs (1)
387foreach (FileInfo file in dir.GetFiles("*.xml"))
RepoTasks (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
ResultsOfTGenerator (2)
Program.cs (2)
206var file = new FileInfo(classFilePath); 292var file = new FileInfo(testFilePath);
Roslyn.Compilers.Extension (1)
CompilerPackage.cs (1)
105foreach (var file in msbuildDirectory.EnumerateFiles($"*Roslyn*{hiveName}*", SearchOption.AllDirectories))
Roslyn.Diagnostics.Analyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
ServerComparison.FunctionalTests (1)
Helpers.cs (1)
19var solutionFileInfo = new FileInfo(Path.Combine(directoryInfo.FullName, "FunctionalTests.slnf"));
System.Configuration.ConfigurationManager (2)
System\Configuration\Internal\InternalConfigHost.cs (2)
214FileInfo info = new FileInfo(streamName); 255FileInfo fi = new FileInfo(streamName);
System.Formats.Tar (1)
System\Formats\Tar\TarEntry.cs (1)
482FileInfo link = new(filePath);
System.IO.FileSystem (1)
System.IO.FileSystem.cs (1)
11[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileInfo))]
System.IO.FileSystem.AccessControl (4)
artifacts\obj\System.IO.FileSystem.AccessControl\Debug\net11.0\System.IO.FileSystem.AccessControl.notsupported.cs (4)
12public static System.IO.FileStream Create(this System.IO.FileInfo fileInfo, System.IO.FileMode mode, System.Security.AccessControl.FileSystemRights rights, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options, System.Security.AccessControl.FileSecurity? fileSecurity) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 16public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 17public static System.Security.AccessControl.FileSecurity GetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.AccessControlSections includeSections) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); } 20public static void SetAccessControl(this System.IO.FileInfo fileInfo, System.Security.AccessControl.FileSecurity fileSecurity) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_AccessControl); }
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
879FileInfo packageFileInfo = new FileInfo(path);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\StringParsingHelpers.Misc.cs (1)
75foreach (var file in files)
System.Private.CoreLib (21)
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (11)
111public FileInfo[] GetFiles() => GetFiles("*", enumerationOptions: EnumerationOptions.Compatible); 115public FileInfo[] GetFiles(string searchPattern) => GetFiles(searchPattern, enumerationOptions: EnumerationOptions.Compatible); 117public FileInfo[] GetFiles(string searchPattern, SearchOption searchOption) 120public FileInfo[] GetFiles(string searchPattern, EnumerationOptions enumerationOptions) 121=> new List<FileInfo>((IEnumerable<FileInfo>)InternalEnumerateInfos(FullPath, searchPattern, SearchTarget.Files, enumerationOptions)).ToArray(); 163public IEnumerable<FileInfo> EnumerateFiles() 166public IEnumerable<FileInfo> EnumerateFiles(string searchPattern) => EnumerateFiles(searchPattern, enumerationOptions: EnumerationOptions.Compatible); 168public IEnumerable<FileInfo> EnumerateFiles(string searchPattern, SearchOption searchOption) 171public IEnumerable<FileInfo> EnumerateFiles(string searchPattern, EnumerationOptions enumerationOptions) 172=> (IEnumerable<FileInfo>)InternalEnumerateInfos(FullPath, searchPattern, SearchTarget.Files, enumerationOptions);
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (3)
156internal static IEnumerable<FileInfo> FileInfos( 162return new FileSystemEnumerable<FileInfo>( 164(ref FileSystemEntry entry) => (FileInfo)entry.ToFileSystemInfo(),
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (3)
1444/// <returns>A <see cref="FileInfo"/> instance that wraps the newly created file.</returns> 1467/// <returns>A <see cref="FileInfo"/> instance that wraps the newly created file symbolic link.</returns> 1489/// <returns>A <see cref="FileInfo"/> instance if <paramref name="linkPath"/> exists, independently if the target exists or not. <see langword="null"/> if <paramref name="linkPath"/> is not a link.</returns>
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (4)
98public FileInfo CopyTo(string destFileName) => CopyTo(destFileName, overwrite: false); 100public FileInfo CopyTo(string destFileName, bool overwrite) 201public FileInfo Replace(string destinationFileName, string? destinationBackupFileName) 204public FileInfo Replace(string destinationFileName, string? destinationBackupFileName, bool ignoreMetadataErrors)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net11.0\System.Runtime.Forwards.cs (1)
306[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.FileInfo))]
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
97FileInfo fileInfo = new FileInfo(filePath);
System.Windows.Forms (3)
System\Windows\Forms\Controls\ListView\ListView.cs (3)
2429FileInfo fi; 2944FileInfo fi = new(fileName); 3099FileInfo fi;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
171FileInfo file = new(path);
Templates.Blazor.Tests (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Templates.Blazor.WebAssembly.Tests (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Templates.Mvc.Tests (3)
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Templates.Tests (4)
NewlineEndingTest.cs (1)
63var fileInfo = new FileInfo(filePath);
src\Shared\CertificateGeneration\UnixCertificateManager.cs (3)
1025var certs = new List<FileInfo>(); 1028foreach (var file in dirInfo.EnumerateFiles()) 1047foreach (var cert in certs)
Test.Utilities (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
Text.Analyzers (3)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
417var info = new FileInfo(fullPath); 440var info = new FileInfo(fullPath);
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
793var fileInfo = new FileInfo(fullPath);
ThreadSafeTaskAnalyzer.Tests (1)
TestHelpers.cs (1)
176typeof(System.IO.FileInfo).Assembly, // System.IO.FileSystem