You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
618 B

2 years ago
  1. using System.Collections;
  2. namespace Entity
  3. {
  4. public class Map : Hashtable
  5. {
  6. public void Put(object key, object value)
  7. {
  8. if (this.ContainsKey(key)) this.Remove(key);
  9. this.Add(key, value);
  10. }
  11. public object Get(object key)
  12. {
  13. if (this.ContainsKey(key))
  14. {
  15. return this[key] ?? "";
  16. };
  17. return "";
  18. }
  19. public void SetParameter(string key, object value)
  20. {
  21. if (this.ContainsKey(key)) this.Remove(key);
  22. this.Add(key, value);
  23. }
  24. }
  25. }