コード例 #1
0
        public void CopyFrom(DiagramLibrary diagramLibrary)
        {
            if (null == diagramLibrary)
            {
                throw new ArgumentNullException(nameof(diagramLibrary));
            }

            foreach (KeyValuePair <string, DiagramCollection> sourceKVP in diagramLibrary.GetAll())
            {
                if (!TryGet(sourceKVP.Key, out DiagramCollection collection))
                {
                    collection = Add(sourceKVP.Key);
                }

                collection.Add(sourceKVP.Value);
            }
        }