Add licensing info
[mono.git] / mcs / class / System.EnterpriseServices / System.EnterpriseServices / ObjectPoolingAttribute.cs
1 // \r
2 // System.EnterpriseServices.ObjectPoolingAttribute.cs\r
3 //\r
4 // Author:\r
5 //   Tim Coleman (tim@timcoleman.com)\r
6 //\r
7 // Copyright (C) Tim Coleman, 2002\r
8 //\r
9
10 //
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
18 // 
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
21 // 
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 \r
31 using System;\r
32 using System.Collections;\r
33 using System.Runtime.InteropServices;\r
34 \r
35 namespace System.EnterpriseServices {\r
36         [AttributeUsage (AttributeTargets.Class)]\r
37         [ComVisible(false)]\r
38         public sealed class ObjectPoolingAttribute : Attribute {\r
39 \r
40                 #region Fields\r
41 \r
42                 int creationTimeout;\r
43                 bool enabled;\r
44                 int minPoolSize;\r
45                 int maxPoolSize;\r
46 \r
47                 #endregion // Fields\r
48 \r
49                 #region Constructors\r
50 \r
51                 public ObjectPoolingAttribute () \r
52                         : this (true)\r
53                 {\r
54                 }\r
55 \r
56                 public ObjectPoolingAttribute (bool enable)\r
57                 {\r
58                         this.enabled = enable;\r
59                 }\r
60 \r
61                 public ObjectPoolingAttribute (int minPoolSize, int maxPoolSize)\r
62                         : this (true, minPoolSize, maxPoolSize)\r
63                 {\r
64                 }\r
65 \r
66                 public ObjectPoolingAttribute (bool enable, int minPoolSize, int maxPoolSize)\r
67                 {\r
68                         this.enabled = enable;\r
69                         this.minPoolSize = minPoolSize;\r
70                         this.maxPoolSize = maxPoolSize;\r
71                 }\r
72 \r
73                 #endregion // Constructors\r
74 \r
75                 #region Properties\r
76 \r
77                 public int CreationTimeout {\r
78                         get { return creationTimeout; }\r
79                         set { creationTimeout = value; }\r
80                 }\r
81 \r
82                 public bool Enabled {\r
83                         get { return enabled; }\r
84                         set { enabled = value; }\r
85                 }\r
86 \r
87                 public int MaxPoolSize {\r
88                         get { return maxPoolSize; }\r
89                         set { maxPoolSize = value; }\r
90                 }\r
91 \r
92                 public int MinPoolSize {\r
93                         get { return minPoolSize; }\r
94                         set { minPoolSize = value; }\r
95                 }\r
96 \r
97                 #endregion // Properties\r
98 \r
99                 #region Methods \r
100 \r
101                 [MonoTODO]\r
102                 public bool AfterSaveChanges (Hashtable info)\r
103                 {\r
104                         throw new NotImplementedException ();\r
105                 }\r
106 \r
107                 [MonoTODO]\r
108                 public bool Apply (Hashtable info)\r
109                 {\r
110                         throw new NotImplementedException ();\r
111                 }\r
112 \r
113                 [MonoTODO]\r
114                 public bool IsValidTarget (string s)\r
115                 {\r
116                         throw new NotImplementedException ();\r
117                 }\r
118 \r
119                 #endregion // Methods\r
120         }\r
121 }\r