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
CustomAttributeArgumentMemberTypeIndicates whether the provided name references a field or a property.
memberName
Utf8StringThe name of the referenced member.
argumentType
TypeSignatureThe type of the argument to store.
argument
CustomAttributeArgumentThe argument value.
Properties
Argument
Gets or sets the argument.
public CustomAttributeArgument Argument { get; set; }
Property Value
ArgumentType
Gets or sets the type of the argument to store.
public TypeSignature ArgumentType { get; set; }
Property Value
MemberName
Gets or sets the name of the referenced member.
public Utf8String? MemberName { get; set; }
Property Value
MemberType
Gets or sets a value indicating whether the referenced member is a field or a property.
public CustomAttributeArgumentMemberType MemberType { get; set; }
Property Value
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
BlobReaderContextThe blob reader context.
reader
BinaryStreamReaderThe 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