summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/MultipartContentMember.cs
blob: fd5bfb56cf4e175289c20c84a1f800069dbc2946 (plain)
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
//-----------------------------------------------------------------------
// <copyright file="MultipartContentMember.cs" company="Andrew Arnott">
//     Copyright (c) Andrew Arnott. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Messaging {
	using System;
	using System.Collections.Generic;
	using System.Linq;
	using System.Net.Http;
	using System.Text;
	using System.Threading.Tasks;

	/// <summary>
	/// Describes a part from a multi-part POST.
	/// </summary>
	public struct MultipartContentMember {
		/// <summary>
		/// Initializes a new instance of the <see cref="MultipartContentMember"/> struct.
		/// </summary>
		/// <param name="content">The content.</param>
		/// <param name="name">The name of this part as it may come from an HTML form.</param>
		/// <param name="fileName">Name of the file.</param>
		public MultipartContentMember(HttpContent content, string name = null, string fileName = null)
			: this() {
			this.Content = content;
			this.Name = name;
			this.FileName = fileName;
		}

		/// <summary>
		/// Gets or sets the content.
		/// </summary>
		/// <value>
		/// The content.
		/// </value>
		public HttpContent Content { get; set; }

		/// <summary>
		/// Gets or sets the HTML form name.
		/// </summary>
		/// <value>
		/// The name.
		/// </value>
		public string Name { get; set; }

		/// <summary>
		/// Gets or sets the name of the file.
		/// </summary>
		/// <value>
		/// The name of the file.
		/// </value>
		public string FileName { get; set; }
	}
}