Пример #1
0
        public WireSerializer(ExtendedActorSystem system) : base(system)
        {
            var akkaSurrogate = 
                Surrogate
                .Create<ISurrogated, ISurrogate>(
                from => from.ToSurrogate(system),
                to => to.FromSurrogate(system));

            _seralizer =
                new Wire.Serializer(new SerializerOptions(
                    preserveObjectReferences: true, 
                    versionTolerance: true,
                    surrogates: new[]
                    {
                        akkaSurrogate
                    }));
        }
Пример #2
0
        public WireSerializer(ExtendedActorSystem system) : base(system)
        {
            var akkaSurrogate =
                Surrogate
                .Create <ISurrogated, ISurrogate>(
                    from => from.ToSurrogate(system),
                    to => to.FromSurrogate(system));

            _seralizer =
                new Wire.Serializer(new SerializerOptions(
                                        preserveObjectReferences: true,
                                        versionTolerance: true,
                                        surrogates: new[]
            {
                akkaSurrogate
            }));
        }