79 references to PlatformInformation
BuildValidator (1)
IldasmUtilities.cs (1)
26var ildasmExeName = PlatformInformation.IsWindows ? "ildasm.exe" : "ildasm";
csc (10)
src\Compilers\Shared\BuildClient.cs (3)
296if (PlatformInformation.IsRunningOnMono) 315if (!PlatformInformation.IsRunningOnMono) 354Debug.Assert(PlatformInformation.IsWindows);
src\Compilers\Shared\BuildServerConnection.cs (4)
463if (PlatformInformation.IsWindows) 548if (PlatformInformation.IsWindows) 586if (PlatformInformation.IsUsingMonoRuntime) 606if (PlatformInformation.IsUsingMonoRuntime)
src\Compilers\Shared\NamedPipeUtil.cs (2)
28if (PlatformInformation.IsUnix) 58if (PlatformInformation.IsWindows)
src\Compilers\Shared\RuntimeHostInfo.cs (1)
54var (fileName, sep) = PlatformInformation.IsWindows
Microsoft.CodeAnalysis (3)
Emit\EmitOptions.cs (1)
19internal static readonly EmitOptions Default = PlatformInformation.IsWindows
FileSystem\PathUtilities.cs (1)
31internal static bool IsUnixLikePlatform => PlatformInformation.IsUnix;
InternalUtilities\FileLockCheck.cs (1)
127if (!PlatformInformation.IsWindows)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (34)
Semantics\InterceptorsTests.cs (34)
3085var comp = CreateCompilation(new[] { (source, PlatformInformation.IsWindows ? @"C:\Users\me\projects\Program.cs" : "/Users/me/projects/Program.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors); 5260var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 5315var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 5336var pathPrefix = PlatformInformation.IsWindows ? @"C:\My\Machine\Specific\Path\" : "/My/Machine/Specific/Path/"; 5385var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 5398..(ReadOnlySpan<DiagnosticDescription>)[PlatformInformation.IsWindows 5452var pathPrefix1 = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path1\""" : "/My/Machine/Specific/Path1/"; 5453var pathPrefix2 = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path2\""" : "/My/Machine/Specific/Path2/"; 5494var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 5529var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 5542..(ReadOnlySpan<DiagnosticDescription>)[PlatformInformation.IsWindows 5545? Diagnostic(ErrorCode.ERR_InterceptorPathNotInCompilation, @"@""/_/Program.cs""").WithArguments(PlatformInformation.IsWindows ? @"C:\_\Program.cs" : "/_/Program.cs").WithLocation(11, 25) 5571var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 5708if (PlatformInformation.IsWindows) 5752if (PlatformInformation.IsWindows) 5800var verifier = CompileAndVerify(new[] { (source, PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"C:\obj\Generated.cs" : "/obj/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors, expectedOutput: "1"); 5836var comp = CreateCompilation(new[] { (source, PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"Generator\Generated.cs" : "Generator/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors); 5874var comp = CreateCompilation(new[] { (source, PlatformInformation.IsWindows ? @"src\Program.cs" : "src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"C:\obj\Generated.cs" : "/obj/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors); 5881Diagnostic(ErrorCode.ERR_InterceptorPathNotInCompilation, @"""../src/Program.cs""").WithArguments(PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs").WithLocation(6, 25) 5913var comp = CreateCompilation(new[] { (source, PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"C:\obj\Generated.cs" : "/obj/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors); 5947var comp = CreateCompilation(new[] { (source, PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"C:\obj\Generated.cs" : "/obj/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors); 5981var comp = CreateCompilation(new[] { (source, PlatformInformation.IsWindows ? @"C:\src\Program.cs" : "/src/Program.cs"), (source2, PlatformInformation.IsWindows ? @"C:\obj\Generated.cs" : "/obj/Generated.cs"), s_attributesSource }, parseOptions: RegularWithInterceptors); 6011var pathPrefix = PlatformInformation.IsWindows ? """C:\My\Machine\Specific\Path\""" : "/My/Machine/Specific/Path/"; 6052var pathPrefix = PlatformInformation.IsWindows ? """My\Machine\Specific\Path\""" : "My/Machine/Specific/Path/"; 6085""", PlatformInformation.IsWindows ? @"C:\src1\file1.cs" : "/src1/file1.cs"); 6087var directory2 = PlatformInformation.IsWindows ? @"C:\src2\" : "/src2/"; 6088var path2 = PlatformInformation.IsWindows ? @"C:\src2\file1.cs" : "/src2/file1.cs"; 6114""", PlatformInformation.IsWindows ? @"C:\src1\interceptors.cs" : "/src1/interceptors.cs");
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GacFileResolver.cs (1)
34PlatformInformation.IsRunningOnMono;
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
18using static Roslyn.Utilities.PlatformInformation;
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\IlasmUtilities.cs (1)
48var ilasmExeName = PlatformInformation.IsWindows ? "ilasm.exe" : "ilasm";
vbc (13)
src\Compilers\Shared\BuildClient.cs (3)
296if (PlatformInformation.IsRunningOnMono) 315if (!PlatformInformation.IsRunningOnMono) 354Debug.Assert(PlatformInformation.IsWindows);
src\Compilers\Shared\BuildServerConnection.cs (4)
463if (PlatformInformation.IsWindows) 548if (PlatformInformation.IsWindows) 586if (PlatformInformation.IsUsingMonoRuntime) 606if (PlatformInformation.IsUsingMonoRuntime)
src\Compilers\Shared\NamedPipeUtil.cs (5)
28if (PlatformInformation.IsUnix) 58if (PlatformInformation.IsWindows) 105private static readonly PipeOptions CurrentUserOption = PlatformInformation.IsRunningOnMono 134if (PlatformInformation.IsWindows) 150if (PlatformInformation.IsRunningOnMono)
src\Compilers\Shared\RuntimeHostInfo.cs (1)
54var (fileName, sep) = PlatformInformation.IsWindows
VBCSCompiler (15)
src\Compilers\Server\VBCSCompiler\MemoryHelper.cs (1)
37if (!PlatformInformation.IsWindows)
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (1)
196if (!PlatformInformation.IsWindows)
src\Compilers\Shared\BuildClient.cs (3)
296if (PlatformInformation.IsRunningOnMono) 315if (!PlatformInformation.IsRunningOnMono) 354Debug.Assert(PlatformInformation.IsWindows);
src\Compilers\Shared\BuildServerConnection.cs (4)
463if (PlatformInformation.IsWindows) 548if (PlatformInformation.IsWindows) 586if (PlatformInformation.IsUsingMonoRuntime) 606if (PlatformInformation.IsUsingMonoRuntime)
src\Compilers\Shared\NamedPipeUtil.cs (5)
28if (PlatformInformation.IsUnix) 58if (PlatformInformation.IsWindows) 105private static readonly PipeOptions CurrentUserOption = PlatformInformation.IsRunningOnMono 134if (PlatformInformation.IsWindows) 150if (PlatformInformation.IsRunningOnMono)
src\Compilers\Shared\RuntimeHostInfo.cs (1)
54var (fileName, sep) = PlatformInformation.IsWindows