DataBinding.cs 899 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // System.Web.UI.DataBinding.cs
  3. //
  4. // Duncan Mak ([email protected])
  5. //
  6. // (C) Ximian, Inc.
  7. //
  8. using System;
  9. namespace System.Web.UI {
  10. public sealed class DataBinding
  11. {
  12. string propertyName;
  13. string propertyType;
  14. string expression;
  15. public DataBinding (string propertyName, string propertyType,
  16. string expression)
  17. {
  18. this.propertyName = propertyName;
  19. this.propertyType = propertyType;
  20. this.expression = expression;
  21. }
  22. public string Expression {
  23. get { return expression; }
  24. }
  25. public string PropertyName {
  26. get { return propertyName; }
  27. }
  28. public string PropertyType {
  29. get { return propertyType; }
  30. }
  31. public override bool Equals (object obj)
  32. {
  33. if (((DataBinding) obj).PropertyName == this.PropertyName)
  34. return true;
  35. else
  36. return false;
  37. }
  38. public override int GetHashCode ()
  39. {
  40. return propertyName.GetHashCode ();
  41. }
  42. }
  43. }