NamedArgumentsEncoder.AddArgument Method

Definition

Overloads

AddArgument(Boolean, Action<NamedArgumentTypeEncoder>, Action<NameEncoder>, Action<LiteralEncoder>)

Encodes a named argument (a field or property).

AddArgument(Boolean, NamedArgumentTypeEncoder, NameEncoder, LiteralEncoder)

Encodes a named argument (a field or property) and returns three encoders that must be used in the order they appear in the parameter list.

AddArgument(Boolean, Action<NamedArgumentTypeEncoder>, Action<NameEncoder>, Action<LiteralEncoder>)

Source:
BlobEncoders.cs
Source:
BlobEncoders.cs
Source:
BlobEncoders.cs
Source:
BlobEncoders.cs

Encodes a named argument (a field or property).

C#
public void AddArgument(bool isField, Action<System.Reflection.Metadata.Ecma335.NamedArgumentTypeEncoder> type, Action<System.Reflection.Metadata.Ecma335.NameEncoder> name, Action<System.Reflection.Metadata.Ecma335.LiteralEncoder> literal);

Parameters

isField
Boolean

true to encode a field, false to encode a property.

type
Action<NamedArgumentTypeEncoder>

The method to call first to encode the type of the argument.

name
Action<NameEncoder>

The method to call second to encode the name of the field or property.

literal
Action<LiteralEncoder>

The method to call third to encode the literal value of the argument.

Exceptions

type, name or literal is null.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)

AddArgument(Boolean, NamedArgumentTypeEncoder, NameEncoder, LiteralEncoder)

Source:
BlobEncoders.cs
Source:
BlobEncoders.cs
Source:
BlobEncoders.cs
Source:
BlobEncoders.cs

Encodes a named argument (a field or property) and returns three encoders that must be used in the order they appear in the parameter list.

C#
public void AddArgument(bool isField, out System.Reflection.Metadata.Ecma335.NamedArgumentTypeEncoder type, out System.Reflection.Metadata.Ecma335.NameEncoder name, out System.Reflection.Metadata.Ecma335.LiteralEncoder literal);

Parameters

isField
Boolean

true to encode a field, false to encode a property.

type
NamedArgumentTypeEncoder

The method to call first to encode the type of the argument.

name
NameEncoder

The method to call second to encode the name of the field or property.

literal
LiteralEncoder

The method to call third to encode the literal value of the argument.

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)