ProcessThreadCollection.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //
  2. // System.Diagnostics.ProcessThreadCollection.cs
  3. //
  4. // Authors:
  5. // Dick Porter ([email protected])
  6. // Andreas Nahr ([email protected])
  7. //
  8. // (C) 2002 Ximian, Inc. http://www.ximian.com
  9. //
  10. using System.Collections;
  11. namespace System.Diagnostics
  12. {
  13. public class ProcessThreadCollection : ReadOnlyCollectionBase
  14. {
  15. protected ProcessThreadCollection()
  16. {
  17. }
  18. public ProcessThreadCollection(ProcessThread[] processThreads)
  19. {
  20. InnerList.AddRange (processThreads);
  21. }
  22. public ProcessThread this[int index] {
  23. get {
  24. return (ProcessThread)InnerList[index];
  25. }
  26. }
  27. public int Add(ProcessThread thread)
  28. {
  29. return InnerList.Add (thread);
  30. }
  31. public bool Contains(ProcessThread thread)
  32. {
  33. return InnerList.Contains (thread);
  34. }
  35. public void CopyTo(ProcessThread[] array, int index)
  36. {
  37. InnerList.CopyTo (array, index);
  38. }
  39. public int IndexOf(ProcessThread thread)
  40. {
  41. return InnerList.IndexOf (thread);
  42. }
  43. public void Insert(int index, ProcessThread thread)
  44. {
  45. InnerList.Insert (index, thread);
  46. }
  47. public void Remove(ProcessThread thread)
  48. {
  49. InnerList.Remove (thread);
  50. }
  51. }
  52. }