Class InputFileContent
- Namespace
- Bunit
- Assembly
- Bunit.Web.dll
Represents a file which can be uploaded.
public class InputFileContent
- Inheritance
-
InputFileContent
- Inherited Members
- Extension Methods
Methods
CreateFromBinary(byte[], string?, DateTimeOffset?, string?)
Creates an InputFileContent instance which has binary content.
public static InputFileContent CreateFromBinary(byte[] fileContent, string? fileName = null, DateTimeOffset? lastChanged = null, string? contentType = null)
Parameters
fileContent
byte[]The binary content.
fileName
stringThe name of the file.
lastChanged
DateTimeOffset?The last modified date of the file.
contentType
stringThe mime type of the file.
Returns
CreateFromText(string, string?, DateTimeOffset?, string?)
Creates an InputFileContent instance which has string content.
public static InputFileContent CreateFromText(string fileContent, string? fileName = null, DateTimeOffset? lastChanged = null, string? contentType = null)
Parameters
fileContent
stringThe string content.
fileName
stringThe name of the file.
lastChanged
DateTimeOffset?The last modified date of the file.
contentType
stringThe mime type of the file.