コード例 #1
0
        /// <summary>
        /// Creates a deployment view.
        /// </summary>
        /// <returns>a DeploymentView object</returns>
        public DeploymentView CreateDeploymentView(String key, String description)
        {
            AssertThatTheViewKeyIsUnique(key);

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

            _deploymentViews.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
        /// <summary>
        /// Creates a deployment view, where the scope of the view is the specified software system.
        /// </summary>
        /// <param name="softwareSystem">the SoftwareSystem object representing the scope of the view</param>
        /// <param name="key">the key for the deployment view (must be unique)</param>
        /// <param name="description">a description of the  view</param>
        /// <returns>a DeploymentView object</returns>
        public DeploymentView CreateDeploymentView(SoftwareSystem softwareSystem, String key, String description)
        {
            AssertThatTheSoftwareSystemIsNotNull(softwareSystem);
            AssertThatTheViewKeyIsUnique(key);

            DeploymentView view = new DeploymentView(softwareSystem, key, description);

            _deploymentViews.Add(view);
            return(view);
        }
コード例 #4
0
 private DeploymentView FindDeploymentView(DeploymentView deploymentView)
 {
     return(_deploymentViews.FirstOrDefault(view => view.Key == deploymentView.Key));
 }