protected override void Dispose(bool disposing)
 {
     try
     {
         if (disposing)
         {
             if (_designerInfoRoot != null)
             {
                 _designerInfoRoot.Dispose();
                 _designerInfoRoot = null;
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing)
                {
                    if (_designerInfoRoot != null)
                    {
                        _designerInfoRoot.Dispose();
                        _designerInfoRoot = null;
                    }

                    if (_mappingModel != null)
                    {
                        _mappingModel.Dispose();
                        _mappingModel = null;
                    }

                    if (_conceptualEntityModel != null)
                    {
                        _conceptualEntityModel.Dispose();
                        _conceptualEntityModel = null;
                    }

                    if (_storageEntityModel != null)
                    {
                        _storageEntityModel.Dispose();
                        _storageEntityModel = null;
                    }

                    if (DiagramArtifact != null)
                    {
                        ModelManager.ClearArtifact(DiagramArtifact.Uri);
                        DiagramArtifact = null;
                    }
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }