Example #1
0
 public IEnumerable <HeapStatItem> EnumerateTypesStats()
 {
     EnsureCache();
     foreach (string str in cache.Keys)
     {
         HeapStatItem item = new HeapStatItem(str, this);
         yield return(item);
     }
 }
Example #2
0
        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;
        }