/// <summary> /// Creates a new <see cref="MemoryPoolHttpResponseStreamWriterFactory"/>. /// </summary> /// <param name="bytePool"> /// The <see cref="IArraySegmentPool{byte}"/> for creating <see cref="byte"/> buffers. /// </param> /// <param name="charPool"> /// The <see cref="IArraySegmentPool{char}"/> for creating <see cref="char"/> buffers. /// </param> public MemoryPoolHttpResponseStreamWriterFactory( IArraySegmentPool<byte> bytePool, IArraySegmentPool<char> charPool) { if (bytePool == null) { throw new ArgumentNullException(nameof(bytePool)); } if (charPool == null) { throw new ArgumentNullException(nameof(charPool)); } _bytePool = bytePool; _charPool = charPool; }
/// <summary> /// Creates a new <see cref="MemoryPoolHttpResponseStreamWriterFactory"/>. /// </summary> /// <param name="bytePool"> /// The <see cref="IArraySegmentPool{byte}"/> for creating <see cref="byte"/> buffers. /// </param> /// <param name="charPool"> /// The <see cref="IArraySegmentPool{char}"/> for creating <see cref="char"/> buffers. /// </param> public MemoryPoolHttpResponseStreamWriterFactory( IArraySegmentPool <byte> bytePool, IArraySegmentPool <char> charPool) { if (bytePool == null) { throw new ArgumentNullException(nameof(bytePool)); } if (charPool == null) { throw new ArgumentNullException(nameof(charPool)); } _bytePool = bytePool; _charPool = charPool; }
public LeasedArraySegment(ArraySegment <T> data, IArraySegmentPool <T> owner) { Data = data; Owner = owner; }