(object value, out TypeId typeId)
| 312 | internal static class DynamicContainerCodec |
| 313 | { |
| 314 | public static bool TryGetTypeId(object value, out TypeId typeId) |
| 315 | { |
| 316 | if (value is IDictionary) |
| 317 | { |
| 318 | typeId = TypeId.Map; |
| 319 | return true; |
| 320 | } |
| 321 | |
| 322 | Type valueType = value.GetType(); |
| 323 | if (IsListLike(value, valueType)) |
| 324 | { |
| 325 | typeId = TypeId.List; |
| 326 | return true; |
| 327 | } |
| 328 | |
| 329 | if (IsSet(valueType)) |
| 330 | { |
| 331 | typeId = TypeId.Set; |
| 332 | return true; |
| 333 | } |
| 334 | |
| 335 | typeId = default; |
| 336 | return false; |
| 337 | } |
| 338 | |
| 339 | public static bool TryWritePayload(object value, WriteContext context, bool hasGenerics) |
| 340 | { |
no test coverage detected