Table of Contents

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 string

The name of the file.

lastChanged DateTimeOffset?

The last modified date of the file.

contentType string

The mime type of the file.

Returns

InputFileContent

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 string

The string content.

fileName string

The name of the file.

lastChanged DateTimeOffset?

The last modified date of the file.

contentType string

The mime type of the file.

Returns

InputFileContent
.NET Foundation

Supported by the .NET Foundation.