public CharactersController(
     ILoggedInCharacterRepository characterRepository,
     ICharactersApi charactersApi,
     ITypesCatalog typesCatalog)
 {
     _characterRepository = characterRepository;
     _charactersApi       = charactersApi;
     _typesCatalog        = typesCatalog;
 }
        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);
        }
Exemple #3
0
 public ScalarSerializer([NotNull] ITypesCatalog typesCatalog, Predicate <Type> blackListChecker = null)
 {
     myTypesCatalog     = typesCatalog ?? throw new ArgumentNullException(nameof(typesCatalog));
     myBlackListChecker = blackListChecker ?? (_ => false);
     Serializers.RegisterFrameworkMarshallers(this);
 }
Exemple #4
0
 public ReflectionRdActivator([NotNull] ReflectionSerializersFactory serializersFactory, [NotNull] IProxyGenerator proxyGenerator, [CanBeNull] ITypesCatalog typesCatalog)
 {
     mySerializersFactory = serializersFactory;
     myTypesCatalog       = typesCatalog;
     myProxyGenerator     = proxyGenerator;
 }
Exemple #5
0
 public ReflectionRdActivator([NotNull] ReflectionSerializersFactory serializersFactory, [CanBeNull] ITypesCatalog typesCatalog)
     : this(serializersFactory, new ProxyGenerator(serializersFactory.Scalars), typesCatalog)
 {
 }
Exemple #6
0
 public ReflectionSerializersFactory([NotNull] ITypesCatalog typeCatalog, IScalarSerializers scalars = null, Predicate <Type> blackListChecker = null)
 {
     myScalars = scalars ?? new ScalarSerializer(typeCatalog, blackListChecker);
     Cache     = new SerializersContainer(mySerializers);
     Serializers.RegisterFrameworkMarshallers(Cache);
 }
Exemple #7
0
 public ScalarSerializer([NotNull] ITypesCatalog typesCatalog)
 {
     myTypesCatalog = typesCatalog ?? throw new ArgumentNullException(nameof(typesCatalog));
     Serializers.RegisterFrameworkMarshallers(this);
 }
Exemple #8
0
 public TypesRegistrar([NotNull] ITypesCatalog catalog, [NotNull] ReflectionSerializersFactory reflectionSerializersFactory)
 {
     myCatalog = catalog ?? throw new ArgumentNullException(nameof(catalog));
     myReflectionSerializersFactory = reflectionSerializersFactory ?? throw new ArgumentNullException(nameof(reflectionSerializersFactory));
 }