68 references to 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)
1073if (f.Length < sizeOfSmallestSourceFile) 1075sizeOfSmallestSourceFile = f.Length; 1115if (f.Length > sizeOfLargestSourceFile) 1117sizeOfLargestSourceFile = f.Length;
Construction\ProjectRootElement.cs (2)
1983if (fileInfo.Length == 0) 1990if (fileInfo.Length > maxSizeToConsiderEmpty)
Microsoft.Build.CommandLine.UnitTests (1)
PerfLog_Tests.cs (1)
54files.ShouldAllBe(f => new FileInfo(f).Length > 0);
Microsoft.Build.Engine.UnitTests (1)
FileLogger_Tests.cs (1)
381Assert.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)
352&& destinationFile.Length == response.Content.Headers.ContentLength
FileState.cs (3)
126Length = new FileInfo(_filename).Length; 151Length = fileInfo.Length; 194var length = (new FileInfo(_filename)).Length;
ManifestUtil\Util.cs (1)
222length = fi.Length;
Unzip.cs (1)
311&& zipArchiveEntry.Length == fileInfo.Length;
Microsoft.Build.Tasks.UnitTests (10)
FileStateTests.cs (6)
149Assert.Equal(info.Length, state.Length); 293Assert.Equal(info.Length, state.Length); 296Assert.Equal(info.Length, state.Length); 299Assert.Equal(info.Length, state.Length); 358Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(Path.GetTempPath()).Length; }, delegate () { var x = new FileState(Path.GetTempPath()).Length; }); 386Helpers.VerifyAssertThrowsSameWay(delegate () { var x = new FileInfo(file).Length; }, delegate () { var x = new FileState(file).Length; });
XslTransformation_Tests.cs (4)
977Assert.NotEqual(new FileInfo(xmlMultiPaths[0].ItemSpec).Length, new FileInfo(xmlMultiPaths[1].ItemSpec).Length); 978Assert.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.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)
8797Assert.True(new FileInfo(exe.Path).Length < oldSize); 8798Assert.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.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.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 (1)
src\BatchSignUtil.cs (1)
248if (fileInfo.Length > _maximumParallelFileSizeInBytes)
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)
641long 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!");
RunTests (2)
Program.cs (2)
245ConsoleUtil.WriteLine($"succeeded ({new FileInfo(dumpFilePath).Length} bytes)"); 428long 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)
138fileSize = (fileInfo.Exists) ? fileInfo.Length : -1;