Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PerformanceCounterPermissionEntryCollection.cs « System.Diagnostics « System « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 818c3886a7e9c2a548c3df96fe7dcbdb7bbc32c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//
// System.Diagnostics.PerformanceCounterPermissionEntryCollection.cs
//
// Authors:
//   Jonathan Pryor (jonpryor@vt.edu)
//
// (C) 2002
//

using System;
using System.Diagnostics;
using System.Collections;
using System.Globalization;

namespace System.Diagnostics {

	[Serializable]
	public class PerformanceCounterPermissionEntryCollection 
		: CollectionBase 
	{
		internal PerformanceCounterPermissionEntryCollection ()
		{
		}

		public PerformanceCounterPermissionEntry this [int index] {
			get {
				return (PerformanceCounterPermissionEntry)
					InnerList[index];
			}
			set {InnerList[index] = value;}
		}

		public int Add (PerformanceCounterPermissionEntry value)
		{
			return InnerList.Add (value);
		}

		public void AddRange (PerformanceCounterPermissionEntry[] value)
		{
			foreach (PerformanceCounterPermissionEntry e in value)
				Add (e);
		}

		public void AddRange (
			PerformanceCounterPermissionEntryCollection value)
		{
			foreach (PerformanceCounterPermissionEntry e in value)
				Add (e);
		}

		public bool Contains (PerformanceCounterPermissionEntry value)
		{
			return InnerList.Contains (value);
		}

		public void CopyTo (PerformanceCounterPermissionEntry[] array,
			int index)
		{
			InnerList.CopyTo (array, index);
		}

		public int IndexOf (PerformanceCounterPermissionEntry value)
		{
			return InnerList.IndexOf (value);
		}

		public void Insert (int index, 
			PerformanceCounterPermissionEntry value)
		{
			InnerList.Insert (index, value);
		}

		protected override void OnClear ()
		{
		}

		protected override void OnInsert (int index, object value)
		{
			if (!(value is PerformanceCounterPermissionEntry))
				throw new NotSupportedException (Locale.GetText(
					"You can only insert " +
					"PerformanceCounterPermissionEntry " +
					"objects into the collection."));
		}

		protected override void OnRemove (int index, object value)
		{
		}

		protected override void OnSet (int index, 
			object oldValue, 
			object newValue)
		{
			if (!(newValue is PerformanceCounterPermissionEntry))
				throw new NotSupportedException (Locale.GetText(
					"You can only insert " +
					"PerformanceCounterPermissionEntry " +
					"objects into the collection."));
		}

		public void Remove (PerformanceCounterPermissionEntry value)
		{
			InnerList.Remove (value);
		}
	}
}