Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public static bool IsInCycle(TypeStore store, DataType dtCandidate)
        {
            var finder = new TypeStoreCycleFinder(store, dtCandidate);

            return(dtCandidate.Accept(finder));
        }