예제 #1
0
        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 });
        }
예제 #2
0
 public void AddType(Type type)
 {
     myRdIdToTypeMapping[RdId.DefineByFqn(type)] = type;
 }
예제 #3
0
        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 });
        }