Repository: microsoft/garnet
File: libs/server/Resp/Vector/RespServerSessionVectors.cs (C#)

Code before:
        {
            if (!storageSession.vectorManager.IsEnabled)
            {
                return AbortWithErrorMessage("ERR Vector Set (preview) commands are not enabled");
            }

            if (parseState.Count != 1)
            {
                return AbortWithWrongNumberOfArguments("VINFO");
            }

            var key = parseState.GetArgSliceByRef(0);
            var res = storageApi.VectorSetInfo(key, out VectorQuantType quantType, out uint vectorDimensions, out uint reducedDimensions, out uint buildExplorationFactor, out uint numLinks, out long size);
            if (res == GarnetStatus.NOTFOUND)
            {
                WriteNull();
                return true;
            }
            
            if (res == GarnetStatus.WRONGTYPE)
            {
                WriteError("ERR Not a Vector Set"u8);
                return true;
            }

            string quantTypeStr = quantType switch
            {
                VectorQuantType.NoQuant => "no-quant",
                VectorQuantType.Bin => "bin",
                VectorQuantType.Q8 => "q8",
                VectorQuantType.XPreQ8 => "xpreq8",
                _ => "invalid",
            };

            WriteArrayLength(12);
            WriteSimpleString("quant-type");
            WriteSimpleString($"{quantTypeStr}");
            WriteSimpleString("input-vector-dimensions");
            WriteSimpleString($"{vectorDimensions}");
            WriteSimpleString("reduced-dimensions");
            WriteSimpleString($"{reducedDimensions}");
            WriteSimpleString("build-exploration-factor");
            WriteSimpleString($"{buildExplorationFactor}");
            WriteSimpleString("num-links");
            WriteSimpleString($"{numLinks}");
            WriteSimpleString("size");
            WriteSimpleString($"{size}");
            return true;
        }

        private bool NetworkVISMEMBER<TGarnetApi>(ref TGarnetApi storageApi)

Review comment (suggestion):
nit: use type inference (ie. `var`) in the Garnet project.  This differs from some other coding standards, but its preferred here.

Code after:

            // TODO: implement!

            while (!RespWriteUtils.TryWriteDirect(CmdStrings.RESP_OK, ref dcurr, dend))
                SendAndReset();

            return true;
        }

        private bool NetworkVINFO<TGarnetApi>(ref TGarnetApi storageApi)
            where TGarnetApi : IGarnetApi
        {
            if (!storageSession.vectorManager.IsEnabled)
            {
                return AbortWithErrorMessage("ERR Vector Set (preview) commands are not enabled");
            }

            if (parseState.Count != 1)
            {
                return AbortWithWrongNumberOfArguments("VINFO");
            }

            var key = parseState.GetArgSliceByRef(0);
            var res = storageApi.VectorSetInfo(key, out VectorQuantType quantType, out var vectorDimensions, out var reducedDimensions, out var buildExplorationFactor, out var numLinks, out var size);
            if (res == GarnetStatus.NOTFOUND)
            {
                WriteNullArray();
                return true;
            }
            else if (res == GarnetStatus.WRONGTYPE)
            {
                return AbortVectorSetWrongType();
            }
            else if (res == GarnetStatus.BADSTATE)
            {
                return AbortVectorSetPartiallyDeleted(ref key);
            }

            var quantTypeSpan = quantType switch
            {
                VectorQuantType.NoQuant => "f32"u8,
                VectorQuantType.Bin => "bin"u8,
                VectorQuantType.Q8 => "q8"u8,
                VectorQuantType.XPreQ8 => "xpreq8"u8,
                _ => throw new GarnetException($"Invalid VectorQuantType: {quantType}"),
            };

            WriteArrayLength(12);
            WriteSimpleString("quant-type"u8);
            WriteSimpleString(quantTypeSpan);
            WriteSimpleString("input-vector-dimensions"u8);