Table of Contents

Class CustomAttributeNamedArgument

Namespace
AsmResolver.DotNet.Signatures
Assembly
AsmResolver.DotNet.dll

Represents an argument value in a custom attribute construction that is assigned to a field or property in the attribute class.

public class CustomAttributeNamedArgument
Inheritance
CustomAttributeNamedArgument
Inherited Members

Constructors

CustomAttributeNamedArgument(CustomAttributeArgumentMemberType, Utf8String?, TypeSignature, CustomAttributeArgument)

Creates a new named custom attribute argument.

public CustomAttributeNamedArgument(CustomAttributeArgumentMemberType memberType, Utf8String? memberName, TypeSignature argumentType, CustomAttributeArgument argument)

Parameters

memberType CustomAttributeArgumentMemberType

Indicates whether the provided name references a field or a property.

memberName Utf8String

The name of the referenced member.

argumentType TypeSignature

The type of the argument to store.

argument CustomAttributeArgument

The argument value.

Properties

Argument

Gets or sets the argument.

public CustomAttributeArgument Argument { get; set; }

Property Value

CustomAttributeArgument

ArgumentType

Gets or sets the type of the argument to store.

public TypeSignature ArgumentType { get; set; }

Property Value

TypeSignature

MemberName

Gets or sets the name of the referenced member.

public Utf8String? MemberName { get; set; }

Property Value

Utf8String

MemberType

Gets or sets a value indicating whether the referenced member is a field or a property.

public CustomAttributeArgumentMemberType MemberType { get; set; }

Property Value

CustomAttributeArgumentMemberType

Methods

FromReader(in BlobReaderContext, ref BinaryStreamReader)

Reads a single named argument from the input stream.

public static CustomAttributeNamedArgument FromReader(in BlobReaderContext context, ref BinaryStreamReader reader)

Parameters

context BlobReaderContext

The blob reader context.

reader BinaryStreamReader

The input stream.

Returns

CustomAttributeNamedArgument

The argument.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Write(BlobSerializationContext)

Writes the named argument to the provided output stream.

public void Write(BlobSerializationContext context)

Parameters

context BlobSerializationContext