Class PropertySignature
- Namespace
- AsmResolver.DotNet.Signatures
- Assembly
- AsmResolver.DotNet.dll
Represents the signature that is assigned to a property. This includes the type of the property, as well as the types of the parameters that it defines.
public class PropertySignature : MethodSignatureBase, IImportable
- Inheritance
-
PropertySignature
- Implements
- Inherited Members
Constructors
PropertySignature(CallingConventionAttributes, TypeSignature, IEnumerable<TypeSignature>)
Initializes a new property signature with the provided property type and a list of parameter types.
public PropertySignature(CallingConventionAttributes attributes, TypeSignature propertyType, IEnumerable<TypeSignature> parameterTypes)
Parameters
attributes
CallingConventionAttributesThe attributes.
propertyType
TypeSignatureThe property type.
parameterTypes
IEnumerable<TypeSignature>The parameter types.
Methods
CreateInstance(TypeSignature)
Creates a new parameter-less method signature for an instance method.
public static PropertySignature CreateInstance(TypeSignature returnType)
Parameters
returnType
TypeSignatureThe return type of the method.
Returns
- PropertySignature
The signature.
CreateInstance(TypeSignature, params TypeSignature[])
Creates a method signature for an instance method that has a number of parameters.
public static PropertySignature CreateInstance(TypeSignature returnType, params TypeSignature[] parameterTypes)
Parameters
returnType
TypeSignatureThe return type of the method.
parameterTypes
TypeSignature[]The parameter types.
Returns
- PropertySignature
The signature.
CreateInstance(TypeSignature, IEnumerable<TypeSignature>)
Creates a method signature for an instance method that has a number of parameters.
public static PropertySignature CreateInstance(TypeSignature returnType, IEnumerable<TypeSignature> parameterTypes)
Parameters
returnType
TypeSignatureThe return type of the method.
parameterTypes
IEnumerable<TypeSignature>The parameter types.
Returns
- PropertySignature
The signature.
CreateStatic(TypeSignature)
Creates a new parameter-less method signature for a static method.
public static PropertySignature CreateStatic(TypeSignature returnType)
Parameters
returnType
TypeSignatureThe return type of the method.
Returns
- PropertySignature
The signature.
CreateStatic(TypeSignature, params TypeSignature[])
Creates a method signature for a static method that has a number of parameters.
public static PropertySignature CreateStatic(TypeSignature returnType, params TypeSignature[] parameterTypes)
Parameters
returnType
TypeSignatureThe return type of the method.
parameterTypes
TypeSignature[]The parameter types.
Returns
- PropertySignature
The signature.
CreateStatic(TypeSignature, IEnumerable<TypeSignature>)
Creates a method signature for a static method that has a number of parameters.
public static PropertySignature CreateStatic(TypeSignature returnType, IEnumerable<TypeSignature> parameterTypes)
Parameters
returnType
TypeSignatureThe return type of the method.
parameterTypes
IEnumerable<TypeSignature>The parameter types.
Returns
- PropertySignature
The signature.
FromReader(ref BlobReaderContext, ref BinaryStreamReader)
Reads a single property signature from an input stream.
public static PropertySignature? FromReader(ref BlobReaderContext context, ref BinaryStreamReader reader)
Parameters
context
BlobReaderContextThe blob reader context.
reader
BinaryStreamReaderThe blob input stream.
Returns
- PropertySignature
The property signature.
ImportWith(ReferenceImporter)
Imports the property signature using the provided reference importer object.
public PropertySignature ImportWith(ReferenceImporter importer)
Parameters
importer
ReferenceImporterThe reference importer to us.
Returns
- PropertySignature
The imported signature.
ImportWithInternal(ReferenceImporter)
Imports the signature using the provided reference importer object.
protected override CallingConventionSignature ImportWithInternal(ReferenceImporter importer)
Parameters
importer
ReferenceImporterThe reference importer to us.
Returns
- CallingConventionSignature
The imported signature.
InstantiateGenericTypes(GenericContext)
Substitutes any generic type parameter in the property signature with the parameters provided by the generic context.
public PropertySignature InstantiateGenericTypes(GenericContext context)
Parameters
context
GenericContextThe generic context.
Returns
- PropertySignature
The instantiated property signature.
Remarks
When the type signature does not contain any generic parameter, this method might return the current instance of the property signature.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
WriteContents(in BlobSerializationContext)
Serializes the blob (without extra data) to an output stream.
protected override void WriteContents(in BlobSerializationContext context)
Parameters
context
BlobSerializationContext