120 references to RuntimeFeature
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
206if (RuntimeFeature.IsDynamicCodeSupported)
dotnet (3)
Commands\DotNetCommandFactory.cs (1)
67if (RuntimeFeature.IsDynamicCodeSupported)
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (1)
100: RuntimeFeature.IsDynamicCodeSupported ? new MSBuildHandler(buildOptions, buildSession)
Parser.cs (1)
84if (RuntimeFeature.IsDynamicCodeSupported)
dotnet-aot (1)
SdkRootLocator.cs (1)
50if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Components (4)
BindConverter.cs (2)
2050if (RuntimeFeature.IsDynamicCodeSupported) 2063if (RuntimeFeature.IsDynamicCodeSupported)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (1)
34if (RuntimeFeature.IsDynamicCodeSupported)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (1)
30if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Components.Endpoints (4)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertyGetter.cs (1)
34if (RuntimeFeature.IsDynamicCodeSupported)
src\aspnetcore\src\Components\Shared\src\Reflection\PropertySetter.cs (1)
30if (RuntimeFeature.IsDynamicCodeSupported)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
213if (RuntimeFeature.IsDynamicCodeSupported) 285if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Components.Forms (4)
FieldIdentifier.cs (3)
138case not null when !RuntimeFeature.IsDynamicCodeSupported: 181if (!RuntimeFeature.IsDynamicCodeSupported) 225if (!RuntimeFeature.IsDynamicCodeSupported)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
281if (!RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Components.Web (1)
src\aspnetcore\src\Components\Shared\src\ExpressionFormatting\ExpressionFormatter.cs (1)
281if (!RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Hosting (2)
GenericHost\GenericWebHostBuilder.cs (1)
290if (containerType.IsValueType && !RuntimeFeature.IsDynamicCodeSupported)
Internal\StartupLoader.cs (1)
72if (type.IsValueType && !RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Http.Abstractions (5)
Extensions\UseMiddlewareExtensions.cs (3)
139var factory = RuntimeFeature.IsDynamicCodeCompiled 202Debug.Assert(!RuntimeFeature.IsDynamicCodeSupported, "Use reflection fallback when dynamic code is not supported."); 267Debug.Assert(RuntimeFeature.IsDynamicCodeSupported, "Use compiled expression when dynamic code is supported.");
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
213if (RuntimeFeature.IsDynamicCodeSupported) 285if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Http.Extensions (3)
RequestDelegateFactory.cs (2)
451if (RuntimeFeature.IsDynamicCodeSupported) 605if (!RuntimeFeature.IsDynamicCodeSupported)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
53: this(preferNonGenericEnumParseOverload: !RuntimeFeature.IsDynamicCodeSupported,
Microsoft.AspNetCore.Http.Results (1)
ResultsOfTHelper.cs (1)
26if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Mvc.Abstractions (1)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
53: this(preferNonGenericEnumParseOverload: !RuntimeFeature.IsDynamicCodeSupported,
Microsoft.AspNetCore.Mvc.Core (2)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
213if (RuntimeFeature.IsDynamicCodeSupported) 285if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.OpenApi (1)
src\aspnetcore\src\Shared\ParameterBindingMethodCache.cs (1)
53: this(preferNonGenericEnumParseOverload: !RuntimeFeature.IsDynamicCodeSupported,
Microsoft.AspNetCore.Routing (3)
Matching\JumpTableBuilder.cs (1)
95return RuntimeFeature.IsDynamicCodeCompiled
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
213if (RuntimeFeature.IsDynamicCodeSupported) 285if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Routing.Abstractions (2)
src\aspnetcore\src\Shared\PropertyHelper\PropertyHelper.cs (2)
213if (RuntimeFeature.IsDynamicCodeSupported) 285if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1144if (!RuntimeFeature.IsDynamicCodeSupported && genericTypes[0].IsValueType)
Microsoft.AspNetCore.SignalR.Core (3)
Internal\HubMethodDescriptor.cs (2)
213if (RuntimeFeature.IsDynamicCodeSupported) 301if (!RuntimeFeature.IsDynamicCodeSupported && streamType.IsValueType)
StreamTracker.cs (1)
41Debug.Assert(RuntimeFeature.IsDynamicCodeSupported || !itemType.IsValueType, "HubMethodDescriptor ensures itemType is not a ValueType when PublishAot=true.");
Microsoft.Build (3)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
92if (!RuntimeFeature.IsDynamicCodeSupported)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
524if (RuntimeFeature.IsDynamicCodeSupported && TaskInstance is not TaskHostTask) 931if (!RuntimeFeature.IsDynamicCodeSupported)
Microsoft.Build.Framework (5)
BuildEnvironmentHelper.cs (2)
109if (!RuntimeFeature.IsDynamicCodeSupported) 454if (!RuntimeFeature.IsDynamicCodeSupported)
Loader\CoreCLRAssemblyLoader.cs (1)
142if (!RuntimeFeature.IsDynamicCodeSupported)
Loader\LoadedType.cs (1)
61string loadedAssemblyLocation = RuntimeFeature.IsDynamicCodeSupported ? loadedAssembly.Location : string.Empty;
NativeMethods.cs (1)
612if (!RuntimeFeature.IsDynamicCodeSupported)
Microsoft.Build.Tasks.Core (2)
GenerateManifestBase.cs (1)
291if (!RuntimeFeature.IsDynamicCodeSupported)
XslTransformation.cs (1)
121if (!RuntimeFeature.IsDynamicCodeSupported)
Microsoft.CodeAnalysis (1)
CommandLine\CommonCompiler.cs (1)
177if (!RuntimeFeature.IsDynamicCodeSupported)
Microsoft.DotNet.Cli.Utils (1)
MSBuildForwardingAppWithoutLogging.cs (1)
191if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.Extensions.DependencyInjection (2)
ServiceProvider.cs (2)
49RuntimeFeature.IsDynamicCodeSupported; 304if (RuntimeFeature.IsDynamicCodeCompiled && !DisableDynamicEngine)
Microsoft.Extensions.DependencyInjection.Abstractions (3)
ActivatorUtilities.cs (2)
283if (!RuntimeFeature.IsDynamicCodeCompiled) 320if (!RuntimeFeature.IsDynamicCodeCompiled)
EmptyServiceProvider.cs (1)
127RuntimeFeature.IsDynamicCodeSupported;
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
581[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.RuntimeFeature))]
netstandard (1)
netstandard.cs (1)
1569[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.RuntimeFeature))]
System.Data.Common (1)
System\Data\DataRowExtensions.cs (1)
151if (!RuntimeFeature.IsDynamicCodeSupported)
System.Diagnostics.DiagnosticSource (2)
System\Diagnostics\DsesFilterAndTransform.cs (2)
798if (!RuntimeFeature.IsDynamicCodeSupported && elemType.IsValueType) 813if (!RuntimeFeature.IsDynamicCodeSupported && (propertyInfo.DeclaringType!.IsValueType || propertyInfo.PropertyType.IsValueType))
System.Linq.Expressions (5)
System\Dynamic\Utils\DelegateHelpers.cs (1)
189if (!RuntimeFeature.IsDynamicCodeSupported)
System\Dynamic\Utils\TypeUtils.cs (1)
42if (RuntimeFeature.IsDynamicCodeSupported)
System\Linq\Expressions\Compiler\DelegateHelpers.cs (1)
115if (RuntimeFeature.IsDynamicCodeSupported)
System\Linq\Expressions\Interpreter\CallInstruction.cs (1)
20private static bool CanCreateArbitraryDelegates => RuntimeFeature.IsDynamicCodeSupported;
System\Linq\Expressions\LambdaExpression.cs (1)
29public static bool CanCompileToIL => RuntimeFeature.IsDynamicCodeSupported;
System.Linq.Parallel (1)
System\Linq\ParallelEnumerable.cs (1)
72internal static bool SinglePartitionMode => !RuntimeFeature.IsMultithreadingSupported;
System.Private.CoreLib (37)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.cs (2)
41internal static bool IsSingleProcessor => RuntimeFeature.IsMultithreadingSupported ? ProcessorCount == 1 : true; 42public static int ProcessorCount { get; } = RuntimeFeature.IsMultithreadingSupported ? GetProcessorCount() : 1;
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (2)
222if (!RuntimeFeature.IsMultithreadingSupported || serializeAsynchronously) 498if (!RuntimeFeature.IsMultithreadingSupported || serializeAsynchronously)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
886return !RuntimeFeature.IsMultithreadingSupported || writer is SyncTextWriter
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (1)
88if (!RuntimeFeature.IsDynamicCodeSupported && !t_allowDynamicCode)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (1)
367Debug.Assert(!RuntimeFeature.IsMultithreadingSupported || Thread.CurrentThread.IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (1)
556RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (1)
102RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.cs (1)
148RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (1)
516RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Monitor.cs (1)
143RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (1)
59RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (2)
323RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 454RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (6)
3160RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 3217RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 3297if (!RuntimeFeature.IsMultithreadingSupported) 5178RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 5253RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 5520RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskAsyncEnumerableExtensions.ToBlockingEnumerable.cs (2)
29RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 84RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (1)
680RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ThreadPoolTaskScheduler.cs (1)
46if (RuntimeFeature.IsMultithreadingSupported && (options & TaskCreationOptions.LongRunning) != 0)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (4)
198RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 241RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 432Debug.Assert(!RuntimeFeature.IsMultithreadingSupported || IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads 444Debug.Assert(!RuntimeFeature.IsMultithreadingSupported || IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
93RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (7)
1398RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1418RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1451RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1470RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1489RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1510RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1531RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
System.Private.DataContractSerialization (3)
System\Runtime\Serialization\AccessorBuilder.cs (2)
69if (RuntimeFeature.IsDynamicCodeSupported || (!declaringType.IsValueType && !propertyType.IsValueType)) 126if (RuntimeFeature.IsDynamicCodeSupported || (!declaringType.IsValueType && !propertyType.IsValueType))
System\Runtime\Serialization\DataContractSerializer.cs (1)
49get { return RuntimeFeature.IsDynamicCodeSupported ? s_option : SerializationOption.ReflectionOnly; }
System.Private.Xml (2)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
624if (type.IsValueType || !RuntimeFeature.IsDynamicCodeSupported)
System\Xml\Serialization\XmlSerializer.cs (1)
118get => RuntimeFeature.IsDynamicCodeSupported ? s_mode : SerializationMode.ReflectionOnly;
System.Runtime (1)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
640[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.RuntimeFeature))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\StrategyBasedComWrappers.cs (1)
54if (OperatingSystem.IsWindows() && RuntimeFeature.IsDynamicCodeSupported && ComObject.BuiltInComSupported && ComObject.ComImportInteropEnabled)
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\CryptoHelpers.cs (1)
55if (!RuntimeFeature.IsDynamicCodeSupported)
System.ServiceModel.Primitives (1)
System\ServiceModel\Dispatcher\InvokerUtil.cs (1)
38if (!s_useLegacyInvokeDelegate.Value && RuntimeFeature.IsDynamicCodeSupported)
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\MemberAccessor.cs (1)
35RuntimeFeature.IsDynamicCodeSupported ?
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Regex.cs (1)
165if (RuntimeFeature.IsDynamicCodeCompiled && (options & RegexOptions.Compiled) != 0)
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.cs (1)
243if (!RuntimeFeature.IsMultithreadingSupported ||
System\Threading\Tasks\TaskReplicator.cs (1)
135if (!RuntimeFeature.IsMultithreadingSupported)