コード例 #1
0
        private static bool RingsHaveDifferentIds(
            [NotNull] Dictionary <int, List <int> > pointIndexesById,
            [NotNull] Rings rings,
            out int firstPointId)
        {
            var errorRingsById = new Dictionary <int, List <IRing> >();

            firstPointId = 0;
            bool first = true;

            foreach (KeyValuePair <int, List <int> > pair in pointIndexesById)
            {
                int        pointId      = pair.Key;
                List <int> pointIndexes = pair.Value;

                if (first)
                {
                    firstPointId = pointId;
                }

                first = false;

                List <IRing> errorRings = rings.GetRingsIfComplete(pointIndexes);

                if (errorRings == null)
                {
                    errorRingsById = null;
                    break;
                }

                errorRingsById.Add(pointId, errorRings);
            }

            return(errorRingsById != null);
        }