Table of Contents

Class BodyContent

Namespace
Fluxzy.Clients.Mock
Assembly
Fluxzy.Core.dll
public class BodyContent
Inheritance
BodyContent
Inherited Members

Constructors

BodyContent(BodyContentLoadingType, BodyType)

[JsonConstructor]
public BodyContent(BodyContentLoadingType origin, BodyType type = BodyType.Unknown)

Parameters

origin BodyContentLoadingType
type BodyType

Properties

Content

[JsonIgnore]
[YamlIgnore]
public byte[]? Content { get; set; }

Property Value

byte[]

ContentBase64

[JsonInclude]
public string? ContentBase64 { get; set; }

Property Value

string

FileName

[JsonInclude]
public string? FileName { get; set; }

Property Value

string

Origin

[JsonInclude]
public BodyContentLoadingType Origin { get; set; }

Property Value

BodyContentLoadingType

Text

[JsonInclude]
public string? Text { get; set; }

Property Value

string

Type

[JsonInclude]
public BodyType Type { get; set; }

Property Value

BodyType

Methods

CreateFromArray(byte[])

public static BodyContent CreateFromArray(byte[] data)

Parameters

data byte[]

Returns

BodyContent

CreateFromFile(string)

public static BodyContent CreateFromFile(string fileName)

Parameters

fileName string

Returns

BodyContent

CreateFromString(string)

public static BodyContent CreateFromString(string contentString)

Parameters

contentString string

Returns

BodyContent

GetContentTypeHeaderValue()

public string? GetContentTypeHeaderValue()

Returns

string

GetLength()

public long GetLength()

Returns

long

GetStream()

public Stream GetStream()

Returns

Stream