4 instantiations of RuntimeFieldHandle
System.Private.CoreLib (4)
src\System\Reflection\RtFieldInfo.cs (1)
115public override RuntimeFieldHandle FieldHandle => new RuntimeFieldHandle(this);
src\System\RuntimeHandles.cs (3)
1395new RuntimeFieldHandle(m_ptr ?? throw new ArgumentNullException(null, SR.Arg_InvalidHandle)); 1445return new RuntimeFieldHandle(fieldInfo); 1892return new RuntimeFieldHandle(field!);
77 references to RuntimeFieldHandle
Microsoft.CodeAnalysis (1)
SpecialType.cs (1)
227/// Indicates that the type is <see cref="RuntimeFieldHandle"/>.
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\SpecialType.cs (1)
227/// Indicates that the type is <see cref="RuntimeFieldHandle"/>.
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\MemberInfo\FieldInfoImpl.cs (1)
42public override RuntimeFieldHandle FieldHandle
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
783[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.RuntimeFieldHandle))]
netstandard (1)
netstandard.cs (1)
1817[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.RuntimeFieldHandle))]
System.Private.CoreLib (67)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\FieldOnTypeBuilderInstantiation.cs (1)
67public override RuntimeFieldHandle FieldHandle => throw new NotImplementedException();
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (7)
36if (!RuntimeFieldHandle.IsFastPathSupported(_fieldInfo)) 49_addressOrOffset = RuntimeFieldHandle.GetStaticFieldAddress(_fieldInfo); 91_addressOrOffset = RuntimeFieldHandle.GetInstanceFieldOffset(_fieldInfo); 178object? ret = RuntimeFieldHandle.GetValue(_fieldInfo, obj, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 193return RuntimeFieldHandle.GetValue(_fieldInfo, obj, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 303RuntimeFieldHandle.SetValue(_fieldInfo, obj, value, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized); 330RuntimeFieldHandle.SetValue(_fieldInfo, obj, value, (RuntimeType)_fieldInfo.FieldType, _fieldInfo.m_declaringType, ref isClassInitialized);
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldInfo.cs (1)
38public abstract RuntimeFieldHandle FieldHandle { get; }
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (1)
153public static unsafe ReadOnlySpan<T> CreateSpan<T>(RuntimeFieldHandle fldHandle)
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (2)
52targetRef = ref RuntimeFieldHandle.GetFieldDataReference(target, field); 57targetRef = ref RuntimeFieldHandle.GetFieldDataReference(ref targetRef, field);
src\System\Reflection\Emit\DynamicILGenerator.cs (8)
785if (handle is RuntimeFieldHandle) 787fieldHandle = ((RuntimeFieldHandle)handle).Value; 940public int GetTokenFor(RuntimeFieldHandle field) 944public int GetTokenFor(RuntimeFieldHandle field, RuntimeTypeHandle contextType) 1036public int GetTokenFor(RuntimeFieldHandle field) 1041public int GetTokenFor(RuntimeFieldHandle field, RuntimeTypeHandle typeContext) 1078internal RuntimeFieldHandle m_fieldHandle; 1081internal GenericFieldInfo(RuntimeFieldHandle fieldHandle, RuntimeTypeHandle context)
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (1)
106public override RuntimeFieldHandle FieldHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
src\System\Reflection\FieldInfo.CoreCLR.cs (2)
8public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle) 24public static FieldInfo GetFieldFromHandle(RuntimeFieldHandle handle, RuntimeTypeHandle declaringType)
src\System\Reflection\MdFieldInfo.cs (1)
60public override RuntimeFieldHandle FieldHandle => throw new NotSupportedException();
src\System\Reflection\RtFieldInfo.cs (7)
41m_fieldAttributes = RuntimeFieldHandle.GetAttributes(handle); 58public override string Name => m_name ??= RuntimeFieldHandle.GetName(this); 62public override int MetadataToken => RuntimeFieldHandle.GetToken(this); 66return RuntimeTypeHandle.GetModule(RuntimeFieldHandle.GetApproxDeclaringType(this)); 96return RuntimeFieldHandle.GetValueDirect(this, (RuntimeType)FieldType, obj, (RuntimeType?)DeclaringType); 112RuntimeFieldHandle.SetValueDirect(this, (RuntimeType)FieldType, obj, value, (RuntimeType?)DeclaringType); 115public override RuntimeFieldHandle FieldHandle => new RuntimeFieldHandle(this);
src\System\Reflection\RuntimeModule.cs (1)
198RuntimeType declaringType = RuntimeFieldHandle.GetApproxDeclaringType(fieldHandle.Value);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (4)
18public static unsafe void InitializeArray(Array array, RuntimeFieldHandle fldHandle) 28if (!RuntimeFieldHandle.GetRVAFieldInfo(fldInfo.Value, out void* address, out uint size)) 89RuntimeFieldHandle fldHandle, 98if (!RuntimeFieldHandle.GetRVAFieldInfo(fldInfo.Value, out void* data, out uint totalSize))
src\System\RuntimeHandles.cs (21)
1391public unsafe partial struct RuntimeFieldHandle : IEquatable<RuntimeFieldHandle>, ISerializable 1394internal RuntimeFieldHandle GetNativeHandle() => 1423if (obj is not RuntimeFieldHandle) 1426RuntimeFieldHandle handle = (RuntimeFieldHandle)obj; 1431public bool Equals(RuntimeFieldHandle handle) 1437/// Returns a new <see cref="RuntimeFieldHandle"/> object created from a handle to a RuntimeFieldInfo. 1439/// <param name="value">An IntPtr handle to a RuntimeFieldInfo to create a <see cref="RuntimeFieldHandle"/> object from.</param> 1440/// <returns>A new <see cref="RuntimeFieldHandle"/> object that corresponds to the value parameter.</returns> 1441public static RuntimeFieldHandle FromIntPtr(IntPtr value) 1449/// Returns the internal pointer representation of a <see cref="RuntimeFieldHandle"/> object. 1451/// <param name="value">A <see cref="RuntimeFieldHandle"/> object to retrieve an internal pointer representation from.</param> 1452/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeFieldHandle"/> object.</returns> 1453public static IntPtr ToIntPtr(RuntimeFieldHandle value) => value.Value; 1455public static bool operator ==(RuntimeFieldHandle left, RuntimeFieldHandle right) => left.Equals(right); 1457public static bool operator !=(RuntimeFieldHandle left, RuntimeFieldHandle right) => !left.Equals(right); 1860public RuntimeFieldHandle GetRuntimeFieldHandleFromMetadataToken(int fieldToken) { return ResolveFieldHandle(fieldToken); } 1862public RuntimeFieldHandle ResolveFieldHandle(int fieldToken) => ResolveFieldHandle(fieldToken, null, null); 1864public RuntimeFieldHandle ResolveFieldHandle(int fieldToken, RuntimeTypeHandle[]? typeInstantiationContext, RuntimeTypeHandle[]? methodInstantiationContext)
src\System\RuntimeType.CoreCLR.cs (10)
312FieldAttributes fieldAttributes = RuntimeFieldHandle.GetAttributes(field); 315RuntimeType approxDeclaringType = RuntimeFieldHandle.GetApproxDeclaringType(field); 316bool isInherited = RuntimeFieldHandle.AcquiresContextFromThis(field) ? 881if (!filter.Match(RuntimeFieldHandle.GetUtf8Name(runtimeFieldHandle))) 887FieldAttributes fieldAttributes = RuntimeFieldHandle.GetAttributes(runtimeFieldHandle); 904runtimeFieldHandle = RuntimeFieldHandle.GetStaticFieldForGenericType(runtimeFieldHandle, declaringType); 1961return GetFieldInfo(RuntimeFieldHandle.GetApproxDeclaringType(fieldHandle), fieldHandle); 1971reflectedType = RuntimeFieldHandle.GetApproxDeclaringType(fieldHandle); 1975RuntimeType declaredType = RuntimeFieldHandle.GetApproxDeclaringType(fieldHandle); 1978if (!RuntimeFieldHandle.AcquiresContextFromThis(fieldHandle) ||
System.Reflection.Context (1)
System\Reflection\Context\Delegation\DelegatingFieldInfo.cs (1)
29public override RuntimeFieldHandle FieldHandle
System.Reflection.Emit (1)
System\Reflection\Emit\FieldBuilderImpl.cs (1)
108public override RuntimeFieldHandle FieldHandle => throw new NotSupportedException(SR.NotSupported_DynamicModule);
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\Fields\RoField.cs (1)
145public sealed override RuntimeFieldHandle FieldHandle => throw new InvalidOperationException(SR.Arg_InvalidOperation_Reflection);
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
712[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.RuntimeFieldHandle))]
System.Runtime.Serialization.Formatters (1)
System\Runtime\Serialization\SerializationFieldInfo.cs (1)
51public override RuntimeFieldHandle FieldHandle => m_field.FieldHandle;