private static List <List <CustomPropertyNameCellsPair> > __GetListOfCpPairLists(
            ShapeIDPairs shapeidpairs,

            List <List <CustomPropertyCells> > listof_listof_cpcells)
        {
            if (listof_listof_cpcells.Count != shapeidpairs.Count)
            {
                throw new Exceptions.InternalAssertionException();
            }

            var listof_listof_cppairs = new List <List <CustomPropertyNameCellsPair> >(shapeidpairs.Count);

            var shape_indices = System.Linq.Enumerable.Range(0, shapeidpairs.Count);

            foreach (int i in shape_indices)
            {
                var shape          = shapeidpairs[i].Shape;
                var listof_cpnames = CustomPropertyHelper.GetNames(shape);
                var listof_cpcells = listof_listof_cpcells[i];

                int num_cps = listof_cpnames.Count;

                var cp_indices     = Enumerable.Range(0, num_cps);
                var listof_cppairs = new List <CustomPropertyNameCellsPair>(num_cps);
                foreach (int cprow in cp_indices)
                {
                    int shapeid = shapeidpairs[i].ShapeID;
                    var cppair  = new CustomPropertyNameCellsPair(shapeid, cprow, listof_cpnames[cprow], listof_cpcells[cprow]);
                    listof_cppairs.Add(cppair);
                }
                listof_listof_cppairs.Add(listof_cppairs);
            }
            return(listof_listof_cppairs);
        }
        private static List <CustomPropertyNameCellsPair> __CreateListofPairs(
            List <string> shape_custprop_names,
            List <CustomPropertyCells> shape_custprop_cells,
            int shapeid)
        {
            int num_props = shape_custprop_names.Count;

            var list          = new List <CustomPropertyNameCellsPair>(num_props);
            var custprop_rows = System.Linq.Enumerable.Range(0, num_props);

            foreach (int custprop_row in custprop_rows)
            {
                string prop_name           = shape_custprop_names[custprop_row];
                var    shape_custprop_cell = shape_custprop_cells[custprop_row];
                var    pair = new CustomPropertyNameCellsPair(shapeid, custprop_row, prop_name, shape_custprop_cell);

                list.Add(pair);
            }

            return(list);
        }