FileOrStringOrFormData Struct

The (File or USVString or FormData) union of ElementInternals.SetFormValue.

public readonly struct FileOrStringOrFormData : IEquatable<FileOrStringOrFormData>
Implements

Properties

NameDescription
ValueGets the value: a File, a String or a FormData.

Gets the value: a File, a String or a FormData.

public object Value { get; }

Property value

object

Methods

NameDescription
Equals(FileOrStringOrFormData)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
FromFile(File)Creates the union from a file.
FromFormData(FormData)Creates the union from a form data.
FromString(string)Creates the union from a string.
GetHashCode()Returns the hash code for this instance.
ToString()Returns the fully qualified type name of this instance.

Equals overloads

Equals(FileOrStringOrFormData)

ElementInternals.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(FileOrStringOrFormData other)
Parameters
other FileOrStringOrFormData
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

ElementInternals.cs

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current instance.
Returns

bool true if obj and this instance are the same type and represent the same value; otherwise, false.

FromFile(File)

ElementInternals.cs

Creates the union from a file.

public static FileOrStringOrFormData FromFile(File value)

Parameters

value File

Returns

FileOrStringOrFormData

FromFormData(FormData)

ElementInternals.cs

Creates the union from a form data.

public static FileOrStringOrFormData FromFormData(FormData value)

Parameters

value FormData

Returns

FileOrStringOrFormData

FromString(string)

ElementInternals.cs

Creates the union from a string.

public static FileOrStringOrFormData FromString(string value)

Parameters

value string

Returns

FileOrStringOrFormData

GetHashCode()

ElementInternals.cs

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int A 32-bit signed integer that is the hash code for this instance.

Returns the fully qualified type name of this instance.

public override string? ToString()

Returns

string? The fully qualified type name.

Operators

NameDescription
operator ==(FileOrStringOrFormData, FileOrStringOrFormData)Returns whether the two unions hold the same value.
implicit operator FileOrStringOrFormData(File)Converts a file to the union.
implicit operator FileOrStringOrFormData(FormData)Converts a form data to the union.
implicit operator FileOrStringOrFormData(string)Converts a string to the union.
operator !=(FileOrStringOrFormData, FileOrStringOrFormData)Returns whether the two unions hold different values.

operator ==(FileOrStringOrFormData, FileOrStringOrFormData)

ElementInternals.cs

Returns whether the two unions hold the same value.

public static bool operator ==(FileOrStringOrFormData left, FileOrStringOrFormData right)

op_Implicit overloads

implicit operator FileOrStringOrFormData(File)

ElementInternals.cs

Converts a file to the union.

public static implicit operator FileOrStringOrFormData(File value)
Parameters
value File
Returns

FileOrStringOrFormData

implicit operator FileOrStringOrFormData(FormData)

ElementInternals.cs

Converts a form data to the union.

public static implicit operator FileOrStringOrFormData(FormData value)
Parameters
value FormData
Returns

FileOrStringOrFormData

implicit operator FileOrStringOrFormData(string)

ElementInternals.cs

Converts a string to the union.

public static implicit operator FileOrStringOrFormData(string value)
Parameters
value string
Returns

FileOrStringOrFormData

operator !=(FileOrStringOrFormData, FileOrStringOrFormData)

ElementInternals.cs

Returns whether the two unions hold different values.

public static bool operator !=(FileOrStringOrFormData left, FileOrStringOrFormData right)