示例#1
0
文件: ViewSet.cs 项目: zpavic/dotnet
        public ComponentView CreateComponentView(Container container, string key, string description)
        {
            AssertThatTheViewKeyIsUnique(key);

            ComponentView view = new ComponentView(container, key, description);

            ComponentViews.Add(view);

            return(view);
        }
示例#2
0
        public ComponentView CreateComponentView(Container container, string key, string description)
        {
            if (GetViewWithKey(key) != null)
            {
                throw new ArgumentException("A view with the key " + key + " already exists.");
            }
            else
            {
                ComponentView view = new ComponentView(container, key, description);
                ComponentViews.Add(view);

                return(view);
            }
        }