Exemple #1
0
        public static TableChairFamily FindOrCreate(TableFamily tableFamily, ChairFamily chairFamily,
                                                    int chairsOnTop, int chairsOnBottom, int chairsOnRight, int chairsOnLeft, double spacing)
        {
            var tuple = Tuple.Create(tableFamily, chairFamily, chairsOnTop, chairsOnBottom, chairsOnRight, chairsOnLeft, spacing);
            TableChairFamily family = null;

            if (!familyInstances.TryGetValue(tuple, out family))
            {
                family = new TableChairFamily {
                    tableFamily   = tableFamily, chairFamily = chairFamily,
                    chairsOnTop   = chairsOnTop, chairsOnBottom = chairsOnBottom,
                    chairsOnRight = chairsOnRight, chairsOnLeft = chairsOnLeft,
                    spacing       = spacing
                };
                familyInstances.Add(tuple, family);
            }
            return(family);
        }
Exemple #2
0
 public void wTableChairFamily(TableChairFamily f) => wBIMFamily(f);