public ReflectionSerializersFacade([CanBeNull] ITypesCatalog typesCatalog = null, [CanBeNull] IScalarSerializers scalarSerializers = null, [CanBeNull] ReflectionSerializersFactory reflectionSerializers = null, [CanBeNull] IProxyGenerator proxyGenerator = null, [CanBeNull] ReflectionRdActivator activator = null, [CanBeNull] TypesRegistrar registrar = null, bool allowSave = false)
        {
            TypesCatalog       = typesCatalog ?? new SimpleTypesCatalog();
            ScalarSerializers  = scalarSerializers ?? new ScalarSerializer(TypesCatalog);
            SerializersFactory = reflectionSerializers ?? new ReflectionSerializersFactory(TypesCatalog, ScalarSerializers);

            ProxyGenerator = proxyGenerator ?? new ProxyGeneratorCache(new ProxyGenerator(ScalarSerializers, allowSave));
            Activator      = activator ?? new ReflectionRdActivator(SerializersFactory, ProxyGenerator, TypesCatalog);
            Registrar      = registrar ?? new TypesRegistrar(TypesCatalog, SerializersFactory);
        }
示例#2
0
 public Serializers([CanBeNull] ITypesRegistrar registrar)
     : this()
 {
     myRegistrar = registrar;
 }
 public MyProtocol(IShellLocks locks, ITypesRegistrar typesCatalog, Lifetime lifetime)
     : base(locks, typesCatalog, lifetime)
 {
 }
示例#4
0
 public Serializers(Lifetime lifetime, [CanBeNull] TaskScheduler scheduler, [CanBeNull] ITypesRegistrar registrar)
 {
     myRegistrar           = registrar;
     myBackgroundRegistrar = new Actor <ToplevelRegistration>("RegisterSerializers", lifetime, RegisterToplevelInternal, scheduler);
     myBackgroundRegistrar.SendBlocking(new ToplevelRegistration(typeof(Serializers), RegisterFrameworkMarshallers));
 }