AreaCollection.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. namespace IndexFormula.Finance
  2. {
  3. using System;
  4. using System.Collections;
  5. using System.Reflection;
  6. public class AreaCollection : CollectionBase
  7. {
  8. public virtual int Add(FormulaArea fa)
  9. {
  10. return base.List.Add(fa);
  11. }
  12. public int IndexOf(FormulaArea fa)
  13. {
  14. return base.List.IndexOf(fa);
  15. }
  16. public virtual void Insert(int Index, FormulaArea fa)
  17. {
  18. base.List.Insert(Index, fa);
  19. }
  20. public void Remove(FormulaArea value)
  21. {
  22. base.List.Remove(value);
  23. }
  24. public void Remove(string Name)
  25. {
  26. base.List.Remove(this[Name]);
  27. }
  28. public virtual FormulaArea this[int Index]
  29. {
  30. get
  31. {
  32. return (FormulaArea) base.List[Index];
  33. }
  34. }
  35. public FormulaArea this[string Name]
  36. {
  37. get
  38. {
  39. foreach (object obj2 in base.List)
  40. {
  41. if (string.Compare(((FormulaArea) obj2).Name, Name, true) == 0)
  42. {
  43. return (FormulaArea) obj2;
  44. }
  45. }
  46. return null;
  47. }
  48. }
  49. }
  50. }