9 references to Encoding
Microsoft.Extensions.Caching.Hybrid (8)
Internal\DefaultHybridCache.StampedeStateT.cs (3)
689int maxBytes = HybridCachePayload.Encoding.GetMaxByteCount(maxChars); 743byteBuffer = byteBuffer.Slice(0, HybridCachePayload.Encoding.GetBytes(value.AsSpan(), byteBuffer)); 744charBuffer = charBuffer.Slice(0, HybridCachePayload.Encoding.GetChars(byteBuffer, charBuffer));
Internal\HybridCachePayload.cs (5)
122MaxVarint64Length + Encoding.GetMaxByteCount(charCount); 216int len = Encoding.GetByteCount(value); 218offset += Encoding.GetBytes(value, 0, value.Length, target, offset); 415int maxChars = Encoding.GetMaxCharCount(length); 424var charCount = Encoding.GetChars(buffer.Slice(0, length), scratch);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
PayloadTests.cs (1)
120byte[] payload = HybridCachePayload.Encoding.GetBytes(value);