Documentation
¶
Index ¶
- Constants
- func GetMethodOverloadName(ctx *winmd.Metadata, methodDef *winmd.MethodDef) string
- func ParseFieldSig(data winmd.SigFieldBlob) (winmd.SigField, error)
- func ParseMethodSig(data winmd.SigMethodDefBlob) (winmd.SigMethodDef, error)
- func ResolveTypeDefOrRefName(m *winmd.Metadata, ci winmd.CodedIndex[winmd.TypeDefOrRef]) (string, string, error)
- type ClassNotFoundError
- type HasContext
- type QualifiedID
- type Store
- type TypeDef
- func (typeDef *TypeDef) Extends(class string) (bool, error)
- func (typeDef *TypeDef) GUID() (string, error)
- func (typeDef *TypeDef) GetAttributeWithType(lookupAttrTypeClass string) ([]byte, error)
- func (typeDef *TypeDef) GetImplementedInterfaces() ([]QualifiedID, error)
- func (typeDef *TypeDef) GetTypeDefAttributesWithType(lookupAttrTypeClass string) [][]byte
- func (typeDef *TypeDef) GetValueForEnumField(fieldIndex uint32) (string, error)
- func (typeDef *TypeDef) IsDelegate() bool
- func (typeDef *TypeDef) IsEnum() bool
- func (typeDef *TypeDef) IsInterface() bool
- func (typeDef *TypeDef) IsRuntimeClass() bool
- func (typeDef *TypeDef) IsStruct() bool
Constants ¶
const ( AttributeTypeGUID = "Windows.Foundation.Metadata.GuidAttribute" AttributeTypeExclusiveTo = "Windows.Foundation.Metadata.ExclusiveToAttribute" AttributeTypeStaticAttribute = "Windows.Foundation.Metadata.StaticAttribute" AttributeTypeActivatableAttribute = "Windows.Foundation.Metadata.ActivatableAttribute" AttributeTypeDefaultAttribute = "Windows.Foundation.Metadata.DefaultAttribute" AttributeTypeOverloadAttribute = "Windows.Foundation.Metadata.OverloadAttribute" )
Custom Attributes
Variables ¶
This section is empty.
Functions ¶
func GetMethodOverloadName ¶
GetMethodOverloadName finds and returns the overload attribute for the given method.
func ParseFieldSig ¶
func ParseFieldSig(data winmd.SigFieldBlob) (winmd.SigField, error)
ParseFieldSig parses a raw ECMA-335 FieldSig blob (§II.23.2.4).
func ParseMethodSig ¶
func ParseMethodSig(data winmd.SigMethodDefBlob) (winmd.SigMethodDef, error)
ParseMethodSig parses a raw ECMA-335 MethodDefSig blob (§II.23.2.1) into a winmd.SigMethodDef. It extends go-winmd's built-in parser by supporting ElementType_GENERICINST, ElementType_VAR, ElementType_MVAR and ElementType_SZARRAY which go-winmd does not yet decode.
func ResolveTypeDefOrRefName ¶
func ResolveTypeDefOrRefName(m *winmd.Metadata, ci winmd.CodedIndex[winmd.TypeDefOrRef]) (string, string, error)
ResolveTypeDefOrRefName resolves a TypeDefOrRef coded index to its namespace and name.
Types ¶
type ClassNotFoundError ¶
type ClassNotFoundError struct {
Class string
}
ClassNotFoundError is returned when a class is not found.
func (*ClassNotFoundError) Error ¶
func (e *ClassNotFoundError) Error() string
type HasContext ¶
type HasContext struct {
// contains filtered or unexported fields
}
HasContext is a helper struct that holds the original context of a metadata element.
func (*HasContext) Ctx ¶
func (hctx *HasContext) Ctx() *winmd.Metadata
Ctx returns the original context of the element.
type QualifiedID ¶
QualifiedID holds the namespace and the name of a qualified element. This may be a type, a static function or a field.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store holds the windows metadata contexts. It can be used to get the metadata across multiple files.
type TypeDef ¶
type TypeDef struct {
winmd.TypeDef
HasContext
// contains filtered or unexported fields
}
TypeDef is a helper struct that wraps winmd.TypeDef and stores the original context of the typeDef.
func (*TypeDef) GetAttributeWithType ¶
GetAttributeWithType returns the value of the given attribute type and fails if not found.
func (*TypeDef) GetImplementedInterfaces ¶
func (typeDef *TypeDef) GetImplementedInterfaces() ([]QualifiedID, error)
GetImplementedInterfaces returns the interfaces implemented by the type.
func (*TypeDef) GetTypeDefAttributesWithType ¶
GetTypeDefAttributesWithType returns the values of all the attributes that match the given type.
func (*TypeDef) GetValueForEnumField ¶
GetValueForEnumField returns the value of the requested enum field.
func (*TypeDef) IsDelegate ¶
IsDelegate returns true if the type is a delegate.
func (*TypeDef) IsInterface ¶
IsInterface returns true if the type is an interface.
func (*TypeDef) IsRuntimeClass ¶
IsRuntimeClass returns true if the type is a runtime class.