(ObjectTranslator translator)
| 221 | ObjectTranslator translator; |
| 222 | |
| 223 | public ObjectCasters(ObjectTranslator translator) |
| 224 | { |
| 225 | this.translator = translator; |
| 226 | castersMap[typeof(char)] = charCaster; |
| 227 | castersMap[typeof(sbyte)] = sbyteCaster; |
| 228 | castersMap[typeof(byte)] = byteCaster; |
| 229 | castersMap[typeof(short)] = shortCaster; |
| 230 | castersMap[typeof(ushort)] = ushortCaster; |
| 231 | castersMap[typeof(int)] = intCaster; |
| 232 | castersMap[typeof(uint)] = uintCaster; |
| 233 | castersMap[typeof(long)] = longCaster; |
| 234 | castersMap[typeof(ulong)] = ulongCaster; |
| 235 | castersMap[typeof(double)] = getDouble; |
| 236 | castersMap[typeof(float)] = floatCaster; |
| 237 | castersMap[typeof(decimal)] = decimalCaster; |
| 238 | castersMap[typeof(bool)] = getBoolean; |
| 239 | castersMap[typeof(string)] = getString; |
| 240 | castersMap[typeof(object)] = getObject; |
| 241 | castersMap[typeof(byte[])] = getBytes; |
| 242 | castersMap[typeof(IntPtr)] = getIntptr; |
| 243 | //special type |
| 244 | castersMap[typeof(LuaTable)] = getLuaTable; |
| 245 | castersMap[typeof(LuaFunction)] = getLuaFunction; |
| 246 | } |
| 247 | |
| 248 | private static object charCaster(RealStatePtr L, int idx, object target) |
| 249 | { |
nothing calls this directly
no outgoing calls
no test coverage detected