// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Net.Http;
namespace System.Web.Http.Hosting
{
///
/// Interface for controlling the use of buffering requests and responses in the host. If a host
/// provides support for buffering requests and/or responses then it can use this interface to
/// determine the policy for when buffering is to be used.
///
public interface IHostBufferPolicySelector
{
///
/// Determines whether the host should buffer the entity body when processing a request with content.
///
/// The host-specific context.
/// true if buffering should be used; otherwise a streamed request should be used.
bool UseBufferedInputStream(object hostContext);
///
/// Determines whether the host should buffer the entity body.
///
/// The response for which to determine
/// whether host output buffering should be used for the response entity body.
/// true if buffering should be used; otherwise a streamed response should be used.
bool UseBufferedOutputStream(HttpResponseMessage response);
}
}