/// <summary> /// Initializes a new instance of the <see cref="ClrThreadStaticFieldAdapter" /> class. /// </summary> /// <param name="threadStaticField">The thread static field.</param> /// <exception cref="ArgumentNullException">threadStaticField</exception> /// <inheritdoc /> public ClrThreadStaticFieldAdapter(IConverter converter, ClrThreadStaticField threadStaticField) : base(converter) { ThreadStaticField = threadStaticField ?? throw new ArgumentNullException(nameof(threadStaticField)); HasSimpleValue = ThreadStaticField.HasSimpleValue; IsInternal = ThreadStaticField.IsInternal; IsObjectReference = ThreadStaticField.IsObjectReference; IsPrimitive = ThreadStaticField.IsPrimitive; IsPrivate = ThreadStaticField.IsPrivate; IsProtected = ThreadStaticField.IsProtected; IsPublic = ThreadStaticField.IsPublic; IsValueClass = ThreadStaticField.IsValueClass; Name = ThreadStaticField.Name; Offset = ThreadStaticField.Offset; Size = ThreadStaticField.Size; Token = ThreadStaticField.Token; }
public CacheFieldInfo(ClrThreadStaticField Field, int FieldIndex) { IsStatic = true; IsThreadStatic = true; TypeName = GetFieldTypeName(Field.Type); Name = AdjustFieldName(Field.Name); MethodTable = HeapStatItem.GetMTOfType(Field.Type); Offset = Field.Offset; Token = Field.Type == null ? 0 : Field.Type.MetadataToken; Module = Field.Type == null || Field.Type.Module == null ? 0 : Field.Type.Module.ImageBase; Assembly = Field.Type == null || Field.Type.Module == null ? 0 : Field.Type.Module.AssemblyId; BackField = Field; Size = Field.Size; CorElementType = (int)Field.ElementType; IsArray = Field.Type == null ? false : Field.Type.IsArray; IsValueType = Field.Type == null ? false : Field.Type.IsValueClass || Field.Type.IsPrimitive; IsGeneric = Field.Type == null ? true : Field.Type.Name.Contains('<') && Field.Type.Name.Contains('>') && Field.Type.Name[0] != '<'; Index = FieldIndex; IsEnum = Field.Type == null ? false : Field.Type.IsEnum; IsString = Field.Type == null ? false : Field.Type.IsString; }
public MDThreadStaticField(ClrThreadStaticField field) { m_field = field; }