Пример #1
0
        public SystemLandscapeView CreateSystemLandscapeView(string key, string description)
        {
            AssertThatTheViewKeyIsUnique(key);

            SystemLandscapeView view = new SystemLandscapeView(Model, key, description);

            _systemLandscapeViews.Add(view);
            return(view);
        }
Пример #2
0
        public void CopyLayoutInformationFrom(ViewSet source)
        {
            foreach (SystemLandscapeView sourceView in source.SystemLandscapeViews)
            {
                SystemLandscapeView destinationView = FindSystemLandscapeView(sourceView);
                if (destinationView != null)
                {
                    destinationView.CopyLayoutInformationFrom(sourceView);
                }
            }

            foreach (SystemContextView sourceView in source.SystemContextViews)
            {
                SystemContextView destinationView = FindSystemContextView(sourceView);
                if (destinationView != null)
                {
                    destinationView.CopyLayoutInformationFrom(sourceView);
                }
            }

            foreach (ContainerView sourceView in source.ContainerViews)
            {
                ContainerView destinationView = FindContainerView(sourceView);
                if (destinationView != null)
                {
                    destinationView.CopyLayoutInformationFrom(sourceView);
                }
            }

            foreach (ComponentView sourceView in source.ComponentViews)
            {
                ComponentView destinationView = FindComponentView(sourceView);
                if (destinationView != null)
                {
                    destinationView.CopyLayoutInformationFrom(sourceView);
                }
            }

            foreach (DynamicView sourceView in source.DynamicViews)
            {
                DynamicView destinationView = FindDynamicView(sourceView);
                if (destinationView != null)
                {
                    destinationView.CopyLayoutInformationFrom(sourceView);
                }
            }

            foreach (DeploymentView sourceView in source.DeploymentViews)
            {
                DeploymentView destinationView = FindDeploymentView(sourceView);
                if (destinationView != null)
                {
                    destinationView.CopyLayoutInformationFrom(sourceView);
                }
            }
        }
Пример #3
0
 private SystemLandscapeView FindSystemLandscapeView(SystemLandscapeView systemLandscapeView)
 {
     return(_systemLandscapeViews.FirstOrDefault(view => view.Key == systemLandscapeView.Key));
 }