Class SerializedCustomAttributeSignature
- Namespace
- AsmResolver.DotNet.Signatures
- Assembly
- AsmResolver.DotNet.dll
Provides a lazy initialized implementation of the CustomAttributeSignature class.
public class SerializedCustomAttributeSignature : CustomAttributeSignature
- Inheritance
-
SerializedCustomAttributeSignature
- Inherited Members
Constructors
SerializedCustomAttributeSignature(in BlobReaderContext, IEnumerable<TypeSignature>, in GenericContext, in BinaryStreamReader)
Initializes a new lazy custom attribute signature from an input blob stream reader.
public SerializedCustomAttributeSignature(in BlobReaderContext readerContext, IEnumerable<TypeSignature> fixedArgTypes, in GenericContext genericContext, in BinaryStreamReader reader)
Parameters
readerContext
BlobReaderContextThe blob reading context the signature is situated in.
fixedArgTypes
IEnumerable<TypeSignature>The types of all fixed arguments.
genericContext
GenericContextThe generic context the arguments live in.
reader
BinaryStreamReaderThe input blob reader.
Methods
Initialize(IList<CustomAttributeArgument>, IList<CustomAttributeNamedArgument>)
Initializes the argument collections of the signature.
protected override void Initialize(IList<CustomAttributeArgument> fixedArguments, IList<CustomAttributeNamedArgument> namedArguments)
Parameters
fixedArguments
IList<CustomAttributeArgument>The collection that will receive the fixed arguments.
namedArguments
IList<CustomAttributeNamedArgument>The collection that will receive the named arguments.
IsCompatibleWith(ICustomAttributeType, IErrorListener)
Validates whether the signature is compatible with the provided attribute constructor.
public override bool IsCompatibleWith(ICustomAttributeType constructor, IErrorListener listener)
Parameters
constructor
ICustomAttributeTypeThe constructor to validate against.
listener
IErrorListenerThe object responsible for reporting any errors during the validation of the signature.
Returns
- bool
true
if the constructor is compatible,false
otherwise.
WriteContents(in BlobSerializationContext)
Serializes the blob (without extra data) to an output stream.
protected override void WriteContents(in BlobSerializationContext context)
Parameters
context
BlobSerializationContext