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

Method MatchesExactLocalTypeMeta

csharp/src/Fory/ReadContext.cs:281–298  ·  view source on GitHub ↗
(TypeMeta typeMeta, int start, int end)

Source from the content-addressed store, hash-verified

279 }
280
281 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
282 internal bool MatchesExactLocalTypeMeta(TypeMeta typeMeta, int start, int end)
283 {
284 if (!TypeResolver.TryGetLocalTypeInfo(typeMeta, out TypeInfo exactLocal))
285 {
286 return false;
287 }
288
289 TypeInfo.TypeMetaCacheEntry local = exactLocal.GetTypeMetaCacheEntry(TrackRef);
290 byte[] encoded = local.EncodedBytes;
291 if (end - start != encoded.Length ||
292 !Reader.Storage.AsSpan(start, encoded.Length).SequenceEqual(encoded))
293 {
294 return false;
295 }
296
297 return true;
298 }
299
300 [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
301 internal TypeMeta DecodeTypeMeta()

Callers 2

ReadRemoteTypeMetaMethod · 0.80
ReadAnyTypeInfoMethod · 0.80

Calls 2

TryGetLocalTypeInfoMethod · 0.80
GetTypeMetaCacheEntryMethod · 0.80

Tested by

no test coverage detected