More working tests.
[castle.git] / Samples / PestControl / Castle.Applications.PestControl / Model / Projects.cs
blob92e357407914abe48b1dc79d95a8114d3cbf906e
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.Applications.PestControl.Model
17 using System;
18 using System.Collections;
20 /// <summary>
21 /// Summary description for Projects.
22 /// </summary>
23 [Serializable]
24 public class Project : Identifiable
26 protected User _owner;
27 protected bool _isPublic;
28 protected String _name;
29 protected String _sourceControl;
30 protected String _buildSystem;
31 protected IDictionary _sourceControlProperties;
33 public Project(bool _isPublic, string _name, string _sourceControl,
34 string _buildSystem, User _owner)
36 this._owner = _owner;
37 this._isPublic = _isPublic;
38 this._name = _name;
39 this._sourceControl = _sourceControl;
40 this._buildSystem = _buildSystem;
42 _sourceControlProperties = new Hashtable(
43 CaseInsensitiveHashCodeProvider.Default, CaseInsensitiveComparer.Default);
46 public User Owner
48 get { return _owner; }
49 set { _owner = value; }
52 public bool IsPublic
54 get { return _isPublic; }
55 set { _isPublic = value; }
58 public string Name
60 get { return _name; }
61 set { _name = value; }
64 public string SourceControl
66 get { return _sourceControl; }
67 set { _sourceControl = value; }
70 public string BuildSystem
72 get { return _buildSystem; }
73 set { _buildSystem = value; }
76 public IDictionary SourceControlProperties
78 get { return _sourceControlProperties; }
82 /// <summary>
83 /// Summary description for ProjectCollection.
84 /// </summary>
85 [Serializable]
86 public class ProjectCollection : CollectionBase
88 public void Add(Project project)
90 lock(this.InnerList.SyncRoot)
92 InnerList.Add(project);