private bool ShouldSimplify(StructureType strNew) { if (strNew.Fields.Count != 1) { return(false); } if (strNew.Fields[0].Offset != 0) { return(false); } // Make sure this field is not in a cycle. if (TypeStoreCycleFinder.IsInCycle(store, strNew)) { return(false); } return(true); }
public static bool IsInCycle(TypeStore store, DataType dtCandidate) { var finder = new TypeStoreCycleFinder(store, dtCandidate); return(dtCandidate.Accept(finder)); }