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

Method WithRegistrationFrom

csharp/src/Fory/TypeInfo.cs:620–643  ·  view source on GitHub ↗
(TypeInfo source)

Source from the content-addressed store, hash-verified

618 }
619
620 internal TypeInfo WithRegistrationFrom(TypeInfo source)
621 {
622 if (!source.IsRegistered)
623 {
624 return this;
625 }
626
627 if (source.RegisterByName)
628 {
629 if (!source.NamespaceName.HasValue || !source.TypeName.HasValue)
630 {
631 throw new InvalidDataException("missing type name metadata for name-registered type");
632 }
633
634 return WithTypeNameRegistration(source.NamespaceName.Value, source.TypeName.Value);
635 }
636
637 if (!source.UserTypeId.HasValue)
638 {
639 throw new InvalidDataException("missing user type id metadata for id-registered type");
640 }
641
642 return WithTypeIdRegistration(source.UserTypeId.Value);
643 }
644
645 internal TypeInfo WithWireTypeInfo(TypeId wireTypeId, TypeMeta? typeMeta = null)
646 {

Callers 1

GetOrCreateTypeInfoMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected