/// <summary>
        /// Serializes the static objects.
        /// </summary>
        private byte[] SerializeStaticObjects()
        {
            if (StaticObjects == null || StaticObjects.Count == 0)
            {
                return(null);
            }

            using (var stream = new MemoryStream())
                using (var writer = new BinaryWriter(stream))
                {
                    StaticObjects.Serialize(writer);

                    return(stream.ToArray());
                }
        }