forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRemoteStreamInfo.cs
More file actions
59 lines (51 loc) · 1.83 KB
/
RemoteStreamInfo.cs
File metadata and controls
59 lines (51 loc) · 1.83 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// 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.Web.Http;
namespace System.Net.Http
{
/// <summary>
/// Represents the result for <see cref="MultipartFormDataRemoteStreamProvider.GetRemoteStream"/>.
/// </summary>
public class RemoteStreamInfo
{
/// <summary>
/// Initializes a new instance of the <see cref="RemoteStreamInfo"/> class.
/// </summary>
/// <param name="remoteStream">
/// The remote stream instance where the file will be written to.
/// </param>
/// <param name="location">The remote file's location.</param>
/// <param name="fileName">The remote file's name.</param>
public RemoteStreamInfo(Stream remoteStream, string location, string fileName)
{
if (remoteStream == null)
{
throw Error.ArgumentNull("remoteStream");
}
if (location == null)
{
throw Error.ArgumentNull("location");
}
if (fileName == null)
{
throw Error.ArgumentNull("fileName");
}
FileName = fileName;
RemoteStream = remoteStream;
Location = location;
}
/// <summary>
/// Gets the remote file's location.
/// </summary>
public string FileName { get; private set; }
/// <summary>
/// Gets the remote file's location.
/// </summary>
public string Location { get; private set; }
/// <summary>
/// Gets the remote stream instance where the file will be written to.
/// </summary>
public Stream RemoteStream { get; private set; }
}
}