CefListWrapper.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. namespace Xilium.CefGlue.Common.Shared.Serialization
  2. {
  3. internal class CefListWrapper : CefValueWrapper<int, ICefListValue>
  4. {
  5. public CefListWrapper(ICefListValue container, int index) : base(container, index)
  6. {
  7. }
  8. public override void SetNull()
  9. {
  10. _container.SetNull(_index);
  11. }
  12. public override void SetBool(bool value)
  13. {
  14. _container.SetBool(_index, value);
  15. }
  16. public override void SetInt(int value)
  17. {
  18. _container.SetInt(_index, value);
  19. }
  20. public override void SetDouble(double value)
  21. {
  22. _container.SetDouble(_index, value);
  23. }
  24. public override void SetString(string value)
  25. {
  26. _container.SetString(_index, value);
  27. }
  28. public override void SetBinary(ICefBinaryValue value)
  29. {
  30. _container.SetBinary(_index, value as CefBinaryValue);
  31. }
  32. public override void SetList(ICefListValue value)
  33. {
  34. _container.SetList(_index, value as CefListValue);
  35. }
  36. public override void SetDictionary(ICefDictionaryValue value)
  37. {
  38. _container.SetDictionary(_index, value as CefDictionaryValue);
  39. }
  40. public override bool GetBool()
  41. {
  42. return _container.GetBool(_index);
  43. }
  44. public override int GetInt()
  45. {
  46. return _container.GetInt(_index);
  47. }
  48. public override double GetDouble()
  49. {
  50. return _container.GetDouble(_index);
  51. }
  52. public override string GetString()
  53. {
  54. return _container.GetString(_index);
  55. }
  56. public override ICefBinaryValue GetBinary()
  57. {
  58. return _container.GetBinary(_index);
  59. }
  60. public override ICefListValue GetList()
  61. {
  62. return _container.GetList(_index);
  63. }
  64. public override ICefDictionaryValue GetDictionary()
  65. {
  66. return _container.GetDictionary(_index);
  67. }
  68. public override CefValueType GetValueType()
  69. {
  70. return _container.GetValueType(_index);
  71. }
  72. public int Count => _container.Count;
  73. }
  74. }