Пример #1
0
        public static byte[] autobidRemoveResponse(string token, int itemId)
        {
            bool b = DataBase.removeAutoBid(token, itemId);

            using (MemoryStream stream = new MemoryStream())
            {
                using (Utf8JsonWriter writer = new Utf8JsonWriter(stream, JW_OPTS))
                {
                    writer.WriteStartObject();
                    if (b)
                    {
                        writer.WriteBoolean("success", true);
                    }
                    else
                    {
                        writer.WriteBoolean("success", false);
                    }
                    writer.WriteEndObject();
                }

                return(stream.ToArray());
            }
        }