aspnetcore/samples/SocialWeather/IStreamFormatter.cs

15 lines
388 B
C#

// 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.IO;
using System.Threading.Tasks;
namespace SocialWeather
{
public interface IStreamFormatter<T>
{
Task<T> ReadAsync(Stream stream);
Task WriteAsync(T value, Stream stream);
}
}