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

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

            EnterpriseContextViews.Add(view);
            return(view);
        }
示例#2
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);
     }
 }
示例#3
0
 private EnterpriseContextView FindEnterpriseContextView(EnterpriseContextView enterpriseContextView)
 {
     return(EnterpriseContextViews.FirstOrDefault(view => view.Key == enterpriseContextView.Key));
 }