/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/SignalR/common/Shared/TextMessageFormatter.cs
20 строк
675 B
Pranav K
Enforce warnings for unused usings (#39280)
04 янв 2022, 00:26
Не верифицирован
04 янв 2022, 00:26
667f068
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Buffers; namespace Microsoft.AspNetCore.Internal; internal static class TextMessageFormatter { // This record separator is supposed to be used only for JSON payloads where 0x1e character // will not occur (is not a valid character) and therefore it is safe to not escape it public const byte RecordSeparator = 0x1e; public static void WriteRecordSeparator(IBufferWriter<byte> output) { var buffer = output.GetSpan(1); buffer[0] = RecordSeparator; output.Advance(1); } }