forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultipartMemoryStreamProvider.cs
More file actions
35 lines (31 loc) · 1.21 KB
/
MultipartMemoryStreamProvider.cs
File metadata and controls
35 lines (31 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// 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.Net.Http.Headers;
using System.Web.Http;
namespace System.Net.Http
{
/// <summary>
/// Provides a <see cref="MultipartStreamProvider"/> implementation that returns a <see cref="MemoryStream"/> instance.
/// This facilitates deserialization or other manipulation of the contents in memory.
/// </summary>
public class MultipartMemoryStreamProvider : MultipartStreamProvider
{
/// <summary>
/// This <see cref="MultipartStreamProvider"/> implementation returns a <see cref="MemoryStream"/> instance.
/// This facilitates deserialization or other manipulation of the contents in memory.
/// </summary>
public override Stream GetStream(HttpContent parent, HttpContentHeaders headers)
{
if (parent == null)
{
throw Error.ArgumentNull("parent");
}
if (headers == null)
{
throw Error.ArgumentNull("headers");
}
return new MemoryStream();
}
}
}