105 references to Length
GenerateDocumentationAndConfigFiles (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
HelixTestTasks (1)
GroupWorkItems.cs (1)
43size = new FileInfo(item.ItemSpec).Length;
Metrics (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Metrics.Legacy (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.AspNetCore.Http (2)
SendFileFallback.cs (2)
26if (offset < 0 || offset > fileInfo.Length) 31(count.Value < 0 || count.Value > fileInfo.Length - offset))
Microsoft.AspNetCore.Http.Results (1)
PhysicalFileHttpResult.cs (1)
176Length = fileInfo.Length;
Microsoft.AspNetCore.HttpLogging (2)
FileLoggerProcessor.cs (2)
203if (fileInfo.Exists && fileInfo.Length > _maxFileSize) 225if (!fileInfo.Exists || fileInfo.Length == 0)
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\PhysicalFileResultExecutor.cs (1)
137Length = fileInfo.Length,
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
ResponseSendFileTests.cs (1)
32FileLength = new FileInfo(AbsoluteFilePath).Length;
Microsoft.Build (6)
BackEnd\Components\Scheduler\Scheduler.cs (4)
1129if (f.Length < sizeOfSmallestSourceFile) 1131sizeOfSmallestSourceFile = f.Length; 1171if (f.Length > sizeOfLargestSourceFile) 1173sizeOfLargestSourceFile = f.Length;
Construction\ProjectRootElement.cs (2)
1983if (fileInfo.Length == 0) 1990if (fileInfo.Length > maxSizeToConsiderEmpty)
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.UnitTests (2)
BackEnd\BuildManager_Tests.cs (1)
4704.Any(info => info.Length > 0);
FileLogger_Tests.cs (1)
378Assert.Equal(0, new FileInfo(logFile).Length);
Microsoft.Build.Tasks.Core (7)
BootstrapperUtil\BootstrapperBuilder.cs (1)
1515sizeAttribute.Value = fi.Length.ToString(CultureInfo.InvariantCulture);
DownloadFile.cs (1)
357&& destinationFile.Length == response.Content.Headers.ContentLength
FileState.cs (3)
127Length = new FileInfo(_filename).Length; 152Length = fileInfo.Length; 195var length = (new FileInfo(_filename)).Length;
ManifestUtil\Util.cs (1)
221length = fi.Length;
Unzip.cs (1)
329&& zipArchiveEntry.Length == fileInfo.Length;
Microsoft.Build.Tasks.UnitTests (10)
FileStateTests.cs (6)
155Assert.Equal(info.Length, state.Length); 299Assert.Equal(info.Length, state.Length); 302Assert.Equal(info.Length, state.Length); 305Assert.Equal(info.Length, state.Length); 364Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(Path.GetTempPath()).Length; }, delegate () { var x = new FileState(TestPath(Path.GetTempPath())).Length; }); 392Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(file).Length; }, delegate () { var x = new FileState(TestPath(file)).Length; });
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.CodeAnalysis (2)
FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.Analyzers (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
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.InteractiveHost (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
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 (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
NetCoreTests.cs (1)
122Assert.True(buildLogInfo.Length > 0);
Microsoft.DotNet.Build.Tasks.Feed (1)
src\AzureStorageExtensions.cs (1)
35var localFileSize = new FileInfo(file).Length;
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageIndex.cs (1)
39.Select(packageIndexFileInfo => $"{packageIndexFileInfo.FullName}:{packageIndexFileInfo.Length}:{packageIndexFileInfo.LastWriteTimeUtc.Ticks}"));
Microsoft.DotNet.Build.Tasks.Packaging.Tests (2)
PackageIndexTests.cs (2)
52long previousLength = new FileInfo(packageIndexFile).Length; 58newFileInfo.Length.Should().Be(previousLength);
Microsoft.DotNet.Build.Tasks.Workloads (1)
Swix\MsiSwixProject.wix.cs (1)
159msiWriter.WriteLine($" size={fileInfo.Length}");
Microsoft.DotNet.RemoteExecutor (1)
RemoteInvokeHandle.cs (1)
230if (exceptionFileInfo.Exists && exceptionFileInfo.Length != 0)
Microsoft.DotNet.SignTool (2)
src\BatchSignUtil.cs (2)
248if (fileInfo.Length > _maximumParallelFileSizeInBytes) 639if (fileInfo.Length == 0)
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFileInfo.cs (1)
29public long Length => _info.Length;
Microsoft.Extensions.Logging.AzureAppServices (1)
FileLoggerProvider.cs (1)
47if (_maxFileSize > 0 && fileInfo.Exists && fileInfo.Length > _maxFileSize)
Microsoft.ML.AutoML (1)
Utils\UserInputValidationUtil.cs (1)
178if (fileInfo.Length == 0)
Microsoft.ML.PerformanceTests (1)
ImageClassificationBench.cs (1)
165var currentSize = new FileInfo(relativeFilePath).Length;
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
211if (File.Exists(errorFile) && new FileInfo(errorFile).Length == 0)
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\FileSystem.vb (1)
319Return (New FileInfo(PathName)).Length
Microsoft.VisualBasic.Tests (3)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (3)
385Assert.Equal(info.Length, FileInfoFromSystemIO.Length); 484Assert.Equal(0, (new FileInfo(TempFile)).Length);
PresentationFramework (1)
MS\Internal\IO\Packaging\XpsFilter.cs (1)
639long byteCount = fi.Length;
PresentationUI (1)
MS\Internal\Documents\Application\DocumentProperties.cs (1)
115fileSize = _fileInfo.Length;
ResultsOfTGenerator (2)
Program.cs (2)
214Console.WriteLine($"{file.Length:N0} bytes written to {file.FullName} successfully!"); 300Console.WriteLine($"{file.Length:N0} bytes written to {file.FullName} successfully!");
Roslyn.Diagnostics.Analyzers (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
RunTests (2)
Program.cs (2)
237ConsoleUtil.WriteLine($"succeeded ({new FileInfo(dumpFilePath).Length} bytes)"); 435long fileSizeInMegabytes = (new FileInfo(dumpFile).Length / 1024) / 1024;
System.Configuration.ConfigurationManager (1)
System\Configuration\Internal\InternalConfigHost.cs (1)
216? new FileVersion(true, info.Length, info.CreationTimeUtc, info.LastWriteTimeUtc)
System.Runtime.Caching (1)
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
134fileSize = (fileInfo.Exists) ? fileInfo.Length : -1;
Templates.Tests (1)
NewlineEndingTest.cs (1)
64if (fileInfo.Length == 0)
Test.Utilities (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;
Text.Analyzers (2)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
418return info.Length; 442fileLength = info.Length;