Example #1
0
        public EnterpriseContextView CreateEnterpriseContextView(string key, string description)
        {
            AssertThatTheViewKeyIsUnique(key);

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

            EnterpriseContextViews.Add(view);
            return(view);
        }
Example #2
0
        public void CopyLayoutInformationFrom(ViewSet source)
        {
            foreach (EnterpriseContextView sourceView in source.EnterpriseContextViews)
            {
                EnterpriseContextView destinationView = FindEnterpriseContextView(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);
                }
            }
        }
Example #3
0
 public EnterpriseContextView CreateEnterpriseContextView(string key, string description)
 {
     if (GetViewWithKey(key) != null)
     {
         throw new ArgumentException("A view with the key " + key + " already exists.");
     }
     else
     {
         EnterpriseContextView view = new EnterpriseContextView(Model, key, description);
         EnterpriseContextViews.Add(view);
         return(view);
     }
 }
Example #4
0
 private EnterpriseContextView FindEnterpriseContextView(EnterpriseContextView enterpriseContextView)
 {
     return(EnterpriseContextViews.FirstOrDefault(view => view.Key == enterpriseContextView.Key));
 }