94 references to RuntimeFeature
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
206if (RuntimeFeature.IsDynamicCodeSupported)
Microsoft.AspNetCore.Components (2)
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.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.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.Core (3)
Internal\HubMethodDescriptor.cs (2)
209if (RuntimeFeature.IsDynamicCodeSupported) 297if (!RuntimeFeature.IsDynamicCodeSupported && streamType.IsValueType)
StreamTracker.cs (1)
35Debug.Assert(RuntimeFeature.IsDynamicCodeSupported || !itemType.IsValueType, "HubMethodDescriptor ensures itemType is not a ValueType when PublishAot=true.");
Microsoft.Extensions.DependencyInjection (2)
ServiceProvider.cs (2)
49!RuntimeFeature.IsDynamicCodeSupported; 304if (RuntimeFeature.IsDynamicCodeCompiled && !DisableDynamicEngine)
Microsoft.Extensions.DependencyInjection.Abstractions (2)
ActivatorUtilities.cs (2)
283if (!RuntimeFeature.IsDynamicCodeCompiled) 320if (!RuntimeFeature.IsDynamicCodeCompiled)
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)
806if (!RuntimeFeature.IsDynamicCodeSupported && elemType.IsValueType) 821if (!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) 497if (!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)
523RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (1)
55RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.cs (1)
157RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (1)
492RuntimeFeature.ThrowIfMultithreadingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Monitor.cs (1)
100RuntimeFeature.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)
3152RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 3209RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 3289if (!RuntimeFeature.IsMultithreadingSupported) 5146RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 5221RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 5488RuntimeFeature.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)
1461RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1481RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1514RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1533RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1552RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1573RuntimeFeature.ThrowIfMultithreadingIsNotSupported(); 1594RuntimeFeature.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)
615if (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)
632[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.RuntimeFeature))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\Marshalling\StrategyBasedComWrappers.cs (1)
53if (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)
167if (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)