public NonGCStaticsNode(MetadataType type, NodeFactory factory)
        {
            Debug.Assert(!type.IsCanonicalSubtype(CanonicalFormKind.Specific));
            _type    = type;
            _factory = factory;
            var preInitFieldInfos = PreInitFieldInfo.GetPreInitFieldInfos(_type, hasGCStaticBase: false);

            if (preInitFieldInfos != null)
            {
                _sortedPreInitFields = new List <PreInitFieldInfo>(preInitFieldInfos);
                _sortedPreInitFields.Sort(PreInitFieldInfo.FieldDescCompare);
            }
        }
Beispiel #2
0
 public GCStaticsNode(MetadataType type)
 {
     Debug.Assert(!type.IsCanonicalSubtype(CanonicalFormKind.Specific));
     _type = type;
     _preInitFieldInfos = PreInitFieldInfo.GetPreInitFieldInfos(_type, hasGCStaticBase: true);
 }