JsonMockWrapper.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Specialized;
  4. namespace LitJson
  5. {
  6. public class JsonMockWrapper : IList, IOrderedDictionary, IEnumerable, ICollection, IDictionary, IJsonWrapper
  7. {
  8. public bool IsArray
  9. {
  10. get
  11. {
  12. return false;
  13. }
  14. }
  15. public bool IsBoolean
  16. {
  17. get
  18. {
  19. return false;
  20. }
  21. }
  22. public bool IsDouble
  23. {
  24. get
  25. {
  26. return false;
  27. }
  28. }
  29. public bool IsInt
  30. {
  31. get
  32. {
  33. return false;
  34. }
  35. }
  36. public bool IsLong
  37. {
  38. get
  39. {
  40. return false;
  41. }
  42. }
  43. public bool IsObject
  44. {
  45. get
  46. {
  47. return false;
  48. }
  49. }
  50. public bool IsString
  51. {
  52. get
  53. {
  54. return false;
  55. }
  56. }
  57. public bool GetBoolean()
  58. {
  59. return false;
  60. }
  61. public double GetDouble()
  62. {
  63. return 0.0;
  64. }
  65. public int GetInt()
  66. {
  67. return 0;
  68. }
  69. public JsonType GetJsonType()
  70. {
  71. return JsonType.None;
  72. }
  73. public long GetLong()
  74. {
  75. return 0L;
  76. }
  77. public string GetString()
  78. {
  79. return string.Empty;
  80. }
  81. public void SetBoolean(bool val)
  82. {
  83. }
  84. public void SetDouble(double val)
  85. {
  86. }
  87. public void SetInt(int val)
  88. {
  89. }
  90. public void SetJsonType(JsonType type)
  91. {
  92. }
  93. public void SetLong(long val)
  94. {
  95. }
  96. public void SetString(string val)
  97. {
  98. }
  99. public string ToJson()
  100. {
  101. return string.Empty;
  102. }
  103. public void ToJson(JsonWriter writer)
  104. {
  105. }
  106. bool IList.IsFixedSize
  107. {
  108. get
  109. {
  110. return true;
  111. }
  112. }
  113. bool IList.IsReadOnly
  114. {
  115. get
  116. {
  117. return true;
  118. }
  119. }
  120. object IList.this[int index]
  121. {
  122. get
  123. {
  124. return null;
  125. }
  126. set
  127. {
  128. }
  129. }
  130. int IList.Add(object value)
  131. {
  132. return 0;
  133. }
  134. void IList.Clear()
  135. {
  136. }
  137. bool IList.Contains(object value)
  138. {
  139. return false;
  140. }
  141. int IList.IndexOf(object value)
  142. {
  143. return -1;
  144. }
  145. void IList.Insert(int i, object v)
  146. {
  147. }
  148. void IList.Remove(object value)
  149. {
  150. }
  151. void IList.RemoveAt(int index)
  152. {
  153. }
  154. int ICollection.Count
  155. {
  156. get
  157. {
  158. return 0;
  159. }
  160. }
  161. bool ICollection.IsSynchronized
  162. {
  163. get
  164. {
  165. return false;
  166. }
  167. }
  168. object ICollection.SyncRoot
  169. {
  170. get
  171. {
  172. return null;
  173. }
  174. }
  175. void ICollection.CopyTo(Array array, int index)
  176. {
  177. }
  178. IEnumerator IEnumerable.GetEnumerator()
  179. {
  180. return null;
  181. }
  182. bool IDictionary.IsFixedSize
  183. {
  184. get
  185. {
  186. return true;
  187. }
  188. }
  189. bool IDictionary.IsReadOnly
  190. {
  191. get
  192. {
  193. return true;
  194. }
  195. }
  196. ICollection IDictionary.Keys
  197. {
  198. get
  199. {
  200. return null;
  201. }
  202. }
  203. ICollection IDictionary.Values
  204. {
  205. get
  206. {
  207. return null;
  208. }
  209. }
  210. object IDictionary.this[object key]
  211. {
  212. get
  213. {
  214. return null;
  215. }
  216. set
  217. {
  218. }
  219. }
  220. void IDictionary.Add(object k, object v)
  221. {
  222. }
  223. void IDictionary.Clear()
  224. {
  225. }
  226. bool IDictionary.Contains(object key)
  227. {
  228. return false;
  229. }
  230. void IDictionary.Remove(object key)
  231. {
  232. }
  233. IDictionaryEnumerator IDictionary.GetEnumerator()
  234. {
  235. return null;
  236. }
  237. object IOrderedDictionary.this[int idx]
  238. {
  239. get
  240. {
  241. return null;
  242. }
  243. set
  244. {
  245. }
  246. }
  247. IDictionaryEnumerator IOrderedDictionary.GetEnumerator()
  248. {
  249. return null;
  250. }
  251. void IOrderedDictionary.Insert(int i, object k, object v)
  252. {
  253. }
  254. void IOrderedDictionary.RemoveAt(int i)
  255. {
  256. }
  257. }
  258. }