Esempio n. 1
0
        private byte[] Serialize(SessionStateItemCollection items)
        {
            if (items.IsNullOrEmpty())
            {
                return(null);
            }

            var ms     = new MemoryStream();
            var writer = new BinaryWriter(ms);

            if (items != null)
            {
                items.Serialize(writer);
            }
            writer.Close();

            return(ms.ToArray());
        }