MCPcopy Create free account
hub / github.com/apache/fory / ReadRemoteTypeMeta

Method ReadRemoteTypeMeta

csharp/src/Fory/TypeResolver.cs:875–907  ·  view source on GitHub ↗
(
        TypeInfo typeInfo,
        TypeId wireTypeId,
        bool assignFieldIds,
        ReadContext context,
        int index,
        ulong header)

Source from the content-addressed store, hash-verified

873 }
874
875 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
876 private TypeMeta ReadRemoteTypeMeta(
877 TypeInfo typeInfo,
878 TypeId wireTypeId,
879 bool assignFieldIds,
880 ReadContext context,
881 int index,
882 ulong header)
883 {
884 context.Reader.MoveBack(sizeof(ulong));
885 int typeMetaStart = context.Reader.Cursor;
886 TypeMeta remoteTypeMeta = context.DecodeTypeMeta();
887 int typeMetaEnd = context.Reader.Cursor;
888 if (!HasValidatedTypeMeta(typeInfo, remoteTypeMeta))
889 {
890 ValidateRemoteTypeMeta(
891 remoteTypeMeta,
892 typeInfo,
893 wireTypeId,
894 assignFieldIds,
895 context);
896 }
897 if (context.MatchesExactLocalTypeMeta(remoteTypeMeta, typeMetaStart, typeMetaEnd))
898 {
899 context.StoreExactLocalTypeMeta(header, remoteTypeMeta);
900 }
901 else
902 {
903 context.StoreRemoteTypeMeta(header, remoteTypeMeta);
904 }
905 context.StoreTypeMetaRef(remoteTypeMeta, index);
906 return remoteTypeMeta;
907 }
908
909 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
910 private void ValidateRemoteTypeMeta(

Callers

nothing calls this directly

Calls 6

MoveBackMethod · 0.80
DecodeTypeMetaMethod · 0.80
StoreRemoteTypeMetaMethod · 0.80
StoreTypeMetaRefMethod · 0.80

Tested by

no test coverage detected