116 references to RuntimeFeature
aspire (2)
NuGet\BundleNuGetService.cs (1)
553if (!RuntimeFeature.IsDynamicCodeSupported)
Utils\IProcessPathProvider.cs (1)
26public bool IsNativeAot => !RuntimeFeature.IsDynamicCodeSupported && string.IsNullOrEmpty(typeof(EnvironmentProcessPathProvider).Assembly.Location);
aspire-tray (1)
Program.cs (1)
91var startupSettings = new WindowsTrayStartupSettings(options, !RuntimeFeature.IsDynamicCodeSupported,
Aspire.Dashboard (1)
Utils\VersionHelpers.cs (1)
20internal static bool IsNativeAot { get; } = !RuntimeFeature.IsDynamicCodeSupported;
Aspire.Hosting.Native.Core.AotSmoke (1)
Program.cs (1)
11if (RuntimeFeature.IsDynamicCodeSupported)
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
266if (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)
52: 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)
52: 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)
52: 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)
234if (RuntimeFeature.IsDynamicCodeSupported) 322if (!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 (4)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
92if (!RuntimeFeature.IsDynamicCodeSupported)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
525if (RuntimeFeature.IsDynamicCodeSupported && TaskInstance is not TaskHostTask) 935if (!RuntimeFeature.IsDynamicCodeSupported)
parent\Shared\TypeLoader.cs (1)
314string assemblyPath = RuntimeFeature.IsDynamicCodeSupported
Microsoft.Build.Framework (7)
BackEnd\TranslatorHelpers.cs (1)
395codeBase = RuntimeFeature.IsDynamicCodeSupported ? assemblyName.CodeBase : string.Empty;
BuildEnvironmentHelper.cs (2)
109if (!RuntimeFeature.IsDynamicCodeSupported) 454if (!RuntimeFeature.IsDynamicCodeSupported)
Loader\CoreCLRAssemblyLoader.cs (1)
142if (!RuntimeFeature.IsDynamicCodeSupported)
Loader\LoadedType.cs (1)
128string loadedAssemblyLocation = RuntimeFeature.IsDynamicCodeSupported ? loadedAssembly.Location : string.Empty;
NativeMethods.cs (1)
620if (!RuntimeFeature.IsDynamicCodeSupported)
Utilities\AssemblyNameExtension.cs (1)
974info.AddValue("codebase", RuntimeFeature.IsDynamicCodeSupported ? asAssemblyName.CodeBase : string.Empty);
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)
193if (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;
Microsoft.JSInterop (2)
Infrastructure\DotNetDispatcher.cs (1)
389if (RuntimeFeature.IsDynamicCodeSupported)
Infrastructure\TaskGenericsUtil.cs (1)
38: RuntimeFeature.IsDynamicCodeSupported
MSBuild (1)
parent\Shared\TypeLoader.cs (1)
314string assemblyPath = RuntimeFeature.IsDynamicCodeSupported
mscorlib (1)
parent\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 (25)
src\ea87ea297559d2f4\TaskAsyncEnumerableExtensions.ToBlockingEnumerable.MultiThreading.cs (2)
16RuntimeFeature.ThrowIfBlockingIsNotSupported(); 70RuntimeFeature.ThrowIfBlockingIsNotSupported();
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\Condition.cs (1)
142RuntimeFeature.ThrowIfBlockingIsNotSupported(millisecondsTimeout);
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.MultiThreading.cs (1)
317RuntimeFeature.ThrowIfBlockingIsNotSupported(timeoutMs);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.MultiThreading.cs (1)
12RuntimeFeature.ThrowIfBlockingIsNotSupported(timeoutMs);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLock.MultiThreading.cs (1)
148RuntimeFeature.ThrowIfBlockingIsNotSupported();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.MultiThreading.cs (1)
256RuntimeFeature.ThrowIfBlockingIsNotSupported(millisecondsTimeout);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.MultiThreading.cs (2)
165RuntimeFeature.ThrowIfBlockingIsNotSupported(millisecondsTimeout); 251RuntimeFeature.ThrowIfBlockingIsNotSupported(millisecondsTimeout);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.MultiThreading.cs (2)
123Debug.Assert(RuntimeFeature.IsMultithreadingSupported); 270Debug.Assert(RuntimeFeature.IsMultithreadingSupported);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.MultiThreading.cs (1)
48RuntimeFeature.ThrowIfBlockingIsNotSupported();
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 (2)
255Debug.Assert(!RuntimeFeature.IsMultithreadingSupported || IsThreadPoolThread); // there are no dedicated threadpool threads on runtimes where we can't start threads 267Debug.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\Thread.Multithreading.cs (3)
36if (!RuntimeFeature.IsMultithreadingSupported) return; 183RuntimeFeature.ThrowIfBlockingIsNotSupported(); 207RuntimeFeature.ThrowIfBlockingIsNotSupported();
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\net12.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)