-
Notifications
You must be signed in to change notification settings - Fork 359
Open
Description
Is your feature request related to a problem? Please describe.
Merge the IODataResponseMessageAsync interface into the IODataResponseMessage interface to simplify the API surface and remove historical technical debt introduced to maintain backward compatibility.
The IODataResponseMessageAsync interface was introduced as a separate interface to add asynchronous stream operations without breaking existing implementations of IODataResponseMessage.
Describe the solution you'd like
Currently:
IODataResponseMessageprovides synchronousGetStream()methodIODataResponseMessageAsyncextendsIODataResponseMessageand addsGetStreamAsync()method
Proposed changes
Merge IODataResponseMessageAsync into IODataResponseMessage:
public interface IODataResponseMessage
{
IEnumerable<KeyValuePair<string, string>> Headers { get; }
int StatusCode { get; set; }
string GetHeader(string headerName);
void SetHeader(string headerName, string headerValue);
Stream GetStream();
Task<Stream> GetStreamAsync(); // Add this method
}Additional context
- Major breaking change: Any custom implementations of
IODataResponseMessagewill need to implementGetStreamAsync() - Classes currently implementing only
IODataResponseMessage(notIODataResponseMessageAsync) will have compilation errors - This is acceptable for a major version release (e.g., 9.x)