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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas N <andreas@mono-cvs.ximian.com>2003-07-05 19:59:37 +0400
committerAndreas N <andreas@mono-cvs.ximian.com>2003-07-05 19:59:37 +0400
commite5a860bb93dde764119fc9d6d4157a0d113ca1e9 (patch)
treec4454d6e01ba050220db483eb2d4f8ee47821d65 /mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
parent05f220be4db886bb777de8f3bed4026105a09b61 (diff)
2003-07-02 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
* CounterCreationData.cs: Added missing attributes * CounterSample.cs: Implemented missing rest, fixed signature * CounterSampleCalculator.cs: Added private constructor, redirected function * Process.cs: Added attributes, added event mechanism * ProcessModule.cs: Added missing attributes * ProcessModuleCollection.cs: Redone using the already inherited-from ArrayList. Simplifies this a LOT * ProcessStartInfo.cs: Added missing attributes, moved internal fields to the begining of the file, restyling * ProcessThread.cs: Added missing attributes, added pseudo constructor * ProcessThreadCollection.cs: Implemented * PerformanceCounterPermission.cs: Fixed typo in class name * PerformanceCounterPermissionAccess.cs: Added attributes, fixed wrong member svn path=/trunk/mcs/; revision=15958
Diffstat (limited to 'mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs')
-rwxr-xr-xmcs/class/System/System.Diagnostics/ProcessModuleCollection.cs51
1 files changed, 21 insertions, 30 deletions
diff --git a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
index c9ebdcefd5a..14ebe2f71d2 100755
--- a/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
+++ b/mcs/class/System/System.Diagnostics/ProcessModuleCollection.cs
@@ -2,56 +2,47 @@
// System.Diagnostics.ProcessModuleCollection.cs
//
// Authors:
-// Dick Porter (dick@ximian.com)
+// Dick Porter (dick@ximian.com)
+// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
//
// (C) 2002 Ximian, Inc. http://www.ximian.com
//
using System.Collections;
-namespace System.Diagnostics {
- public class ProcessModuleCollection : ReadOnlyCollectionBase {
- private ProcessModule[] modules;
+namespace System.Diagnostics
+{
+ public class ProcessModuleCollection : ReadOnlyCollectionBase
+ {
- [MonoTODO]
- protected ProcessModuleCollection() {
+ protected ProcessModuleCollection()
+ {
}
- public ProcessModuleCollection(ProcessModule[] processModules) {
- modules=processModules;
+ public ProcessModuleCollection(ProcessModule[] processModules)
+ {
+ InnerList.AddRange (processModules);
}
public ProcessModule this[int index] {
get {
- return(modules[index]);
+ return (ProcessModule)InnerList[index];
}
}
- public bool Contains(ProcessModule module) {
- foreach(ProcessModule test in modules) {
- if(module==test) {
- return(true);
- }
- }
-
- return(false);
+ public bool Contains(ProcessModule module)
+ {
+ return InnerList.Contains (module);
}
- [MonoTODO]
- public void CopyTo(ProcessModule[] array, int index) {
+ public void CopyTo(ProcessModule[] array, int index)
+ {
+ InnerList.CopyTo (array, index);
}
- public int IndexOf(ProcessModule module) {
- int i;
-
- for(i=0; i<modules.Length; i++) {
- if(modules[i]==module) {
- return(i);
- }
- }
-
- // FIXME!
- return(0);
+ public int IndexOf(ProcessModule module)
+ {
+ return InnerList.IndexOf (module);
}
}
}