**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Messaging / System.Messaging / MessageQueuePermissionEntryCollection.cs
blobc3fb8cd32f32b54584ca54446a26ebab2b753d5a
1 //
2 // System.Messaging
3 //
4 // Authors:
5 // Peter Van Isacker (sclytrack@planetinternet.be)
6 //
7 // (C) 2003 Peter Van Isacker
8 //
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.
30 using System;
31 using System.Collections;
33 namespace System.Messaging
35 [Serializable]
36 public class MessageQueuePermissionEntryCollection: CollectionBase
38 private MessageQueuePermission owner;
40 internal MessageQueuePermissionEntryCollection (MessageQueuePermission owner)
42 this.owner = owner;
45 public MessageQueuePermissionEntry this[int index]
47 get
49 return ((MessageQueuePermissionEntry) base.List[index]);
51 set
53 base.List[index] = value;
57 public int Add(MessageQueuePermissionEntry value)
59 return base.List.Add (value);
62 public void AddRange(MessageQueuePermissionEntry[] value)
64 if (value == null)
66 throw new ArgumentNullException ("value");
69 for (int counter = 0; counter < value.Length; counter++)
71 this.Add (value[counter]);
75 public void AddRange(MessageQueuePermissionEntryCollection value)
77 if (value == null)
79 throw new ArgumentNullException ("value");
82 int entryCount = value.Count;
83 for (int counter = 0; counter < entryCount; counter++)
85 this.Add (value[counter]);
89 public bool Contains(MessageQueuePermissionEntry value)
91 return base.List.Contains (value);
94 public void CopyTo(MessageQueuePermissionEntry[] array,int index)
96 base.List.CopyTo (array, index);
99 [MonoTODO]
100 public int IndexOf(MessageQueuePermissionEntry value)
102 return base.List.IndexOf (value);
105 public void Insert(int index, MessageQueuePermissionEntry value)
107 base.List.Insert (index, value);
110 public void Remove(MessageQueuePermissionEntry value)
112 base.List.Remove (value);
115 [MonoTODO]
116 protected override void OnClear()
120 [MonoTODO]
121 protected override void OnInsert(int index,object value)
125 [MonoTODO]
126 protected override void OnRemove(int index,object value)
130 [MonoTODO]
131 protected override void OnSet(int index,object oldValue,object newValue)