public static EnvironmentInfo Deserialize([NotNull] string environment, [CanBeNull] byte[] data)
        {
            if (data == null || data.Length == 0)
            {
                return(new EnvironmentInfo(environment, null, null));
            }

            var reader = new BinaryBufferReader(data, 0);

            var version = reader.ReadInt32();

            var parentEnvironment = reader.ReadNullable(r => r.ReadString());
            var properties        = version >= WithPropertiesVersion
                ? DeserializeProperties(reader)
                : null;

            return(new EnvironmentInfo(environment, parentEnvironment, properties));
        }