internal void Register(Type type, ISerializers serializers) { var serializerPair = myReflectionSerializersFactory.GetOrRegisterSerializerPair(type); ReflectionUtil.InvokeGenericThis(serializers, nameof(serializers.Register), type, new[] { serializerPair.Reader, serializerPair.Writer, RdId.DefineByFqn(type).Value }); }
public void AddType(Type type) { myRdIdToTypeMapping[RdId.DefineByFqn(type)] = type; }
private void Register(Type type, ISerializersContainer serializers) { var instanceSerializer = type.IsInterface || type.IsAbstract; var serializerPair = myReflectionSerializersFactory.GetOrRegisterSerializerPair(type, instanceSerializer); ReflectionUtil.InvokeGenericThis(serializers, nameof(serializers.Register), type, new[] { serializerPair.Reader, serializerPair.Writer, RdId.DefineByFqn(type).Value }); }