|
| 1 | +using System.Collections.Generic; |
| 2 | + |
| 3 | +namespace HttpMultipartParser |
| 4 | +{ |
| 5 | + /// <summary> |
| 6 | + /// The FileStreamDelegate defining functions that can handle file stream data from this parser. |
| 7 | + /// |
| 8 | + /// Delegates can assume that the data is sequential i.e. the data received by any delegates will be |
| 9 | + /// the data immediately following any previously received data. |
| 10 | + /// </summary> |
| 11 | + /// <param name="name">The name of the multipart data.</param> |
| 12 | + /// <param name="fileName">The name of the file.</param> |
| 13 | + /// <param name="contentType">The content type of the multipart data.</param> |
| 14 | + /// <param name="contentDisposition">The content disposition of the multipart data.</param> |
| 15 | + /// <param name="buffer">Some of the data from the file (not necessarily all of the data).</param> |
| 16 | + /// <param name="bytes">The length of data in buffer.</param> |
| 17 | + /// <param name="partNumber">Each chunk (or "part") in a given file is sequentially numbered, starting at zero.</param> |
| 18 | + /// <param name="additionalProperties">Properties other than the "well known" ones (such as name, filename, content-type, etc.) associated with a file stream.</param> |
| 19 | + public delegate void FileStreamDelegate(string name, string fileName, string contentType, string contentDisposition, byte[] buffer, int bytes, int partNumber, IDictionary<string, string> additionalProperties); |
| 20 | + |
| 21 | + /// <summary> |
| 22 | + /// The StreamClosedDelegate defining functions that can handle stream being closed. |
| 23 | + /// </summary> |
| 24 | + public delegate void StreamClosedDelegate(); |
| 25 | + |
| 26 | + /// <summary> |
| 27 | + /// The ParameterDelegate defining functions that can handle multipart parameter data. |
| 28 | + /// </summary> |
| 29 | + /// <param name="part">The parsed parameter part.</param> |
| 30 | + public delegate void ParameterDelegate(ParameterPart part); |
| 31 | + |
| 32 | + /// <summary> |
| 33 | + /// The BinaryParameterDelegate defining functions that can handle multipart parameter data. |
| 34 | + /// </summary> |
| 35 | + /// <param name="binaryPart">The parsed parameter part.</param> |
| 36 | + public delegate void BinaryParameterDelegate(ParameterPartBinary binaryPart); |
| 37 | +} |
0 commit comments