Exemple #1
0
        public string Serialize(ISerializable serializable)
        {
            serializable.NotNull(nameof(serializable));

            using MemoryStream stream = new();
            this.formatter.Serialize(stream, serializable);
            return(Convert.ToBase64String(stream.ToArray()));
        }