(object value, WriteContext context)
| 145 | public static class DynamicAnyCodec |
| 146 | { |
| 147 | internal static void WriteAnyTypeInfo(object value, WriteContext context) |
| 148 | { |
| 149 | if (DynamicContainerCodec.TryGetTypeId(value, out TypeId containerTypeId)) |
| 150 | { |
| 151 | context.Writer.WriteUInt8((byte)containerTypeId); |
| 152 | return; |
| 153 | } |
| 154 | |
| 155 | if (TryWriteKnownTypeInfo(value, context)) |
| 156 | { |
| 157 | return; |
| 158 | } |
| 159 | |
| 160 | TypeInfo typeInfo = context.TypeResolver.GetTypeInfo(ResolveRuntimeType(value)); |
| 161 | context.TypeResolver.WriteTypeInfo(typeInfo, context); |
| 162 | } |
| 163 | |
| 164 | internal static Type ResolveRuntimeType(object value) |
| 165 | { |
no test coverage detected