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
readerContextBlobReaderContextThe blob reading context the signature is situated in.
fixedArgTypesIEnumerable<TypeSignature>The types of all fixed arguments.
genericContextGenericContextThe generic context the arguments live in.
readerBinaryStreamReaderThe 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
fixedArgumentsIList<CustomAttributeArgument>The collection that will receive the fixed arguments.
namedArgumentsIList<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
constructorICustomAttributeTypeThe constructor to validate against.
listenerIErrorListenerThe object responsible for reporting any errors during the validation of the signature.
Returns
- bool
trueif the constructor is compatible,falseotherwise.
WriteContents(in BlobSerializationContext)
Serializes the blob (without extra data) to an output stream.
protected override void WriteContents(in BlobSerializationContext context)
Parameters
contextBlobSerializationContext