コード例 #1
0
ファイル: ViewSet.cs プロジェクト: zpavic/dotnet
        public ContainerView CreateContainerView(SoftwareSystem softwareSystem, string key, string description)
        {
            AssertThatTheViewKeyIsUnique(key);

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

            ContainerViews.Add(view);

            return(view);
        }
コード例 #2
0
ファイル: ViewSet.cs プロジェクト: fhchina/dotnet-1
        public ContainerView CreateContainerView(SoftwareSystem softwareSystem, string key, string description)
        {
            if (GetViewWithKey(key) != null)
            {
                throw new ArgumentException("A view with the key " + key + " already exists.");
            }
            else
            {
                ContainerView view = new ContainerView(softwareSystem, key, description);
                ContainerViews.Add(view);

                return(view);
            }
        }
コード例 #3
0
ファイル: ViewSet.cs プロジェクト: zpavic/dotnet
 private ContainerView FindContainerView(ContainerView containerView)
 {
     return(ContainerViews.FirstOrDefault(view => view.Key == containerView.Key));
 }