XdmTypeAttribute ClassXdmTypeAttribute ClassXdmTypeAttribute Class

This attribute is used to specify the XDM type of an argument or return value of a function exported in an XDM module.

Inheritance Hierarchy

Syntax

Public Class XdmTypeAttribute _
        Inherits Attribute
public class XdmTypeAttribute : Attribute
public:
ref class XdmTypeAttribute : Attribute^
 
The XdmTypeAttributeXdmTypeAttributeXdmTypeAttribute type exposes the following members.

Constructors

 ConstructorDescription
Public methodXdmTypeAttribute ()XdmTypeAttribute ()XdmTypeAttribute () Creates a new instance of the XdmTypeAttributeXdmTypeAttributeXdmTypeAttribute class.
Public methodXdmTypeAttribute (XmlTypeCode)XdmTypeAttribute (XmlTypeCode)XdmTypeAttribute (XmlTypeCode) Creates a new instance of the XdmTypeAttributeXdmTypeAttributeXdmTypeAttribute class wit a particular item type.
Public methodXdmTypeAttribute (XmlTypeCode, Quantifier)XdmTypeAttribute (XmlTypeCode, Quantifier)XdmTypeAttribute (XmlTypeCode, Quantifier) Initializes a new instance of the XdmTypeAttributeXdmTypeAttributeXdmTypeAttribute class with a particular sequence type.

Top

Properties

 PropertyDescription
Public propertyQuantifierQuantifierQuantifier Gets or sets the quantifier of the sequence.
Public propertyTypeCodeTypeCodeTypeCode Gets or sets a type code representing the types of the items in the sequence.
Public propertyAttribute.TypeIdAttribute.TypeIdAttribute::TypeId When implemented in a derived class, gets a unique identifier for this AttributeAttributeAttribute. (Inherited from System.AttributeSystem.AttributeSystem::Attribute)

Top

Methods

 MethodDescription
Public methodAttribute.EqualsAttribute.EqualsAttribute::Equals Returns a value that indicates whether this instance is equal to a specified object. (Overrides Object.EqualsObject.EqualsObject::Equals)
Protected methodObject.FinalizeObject.FinalizeObject::Finalize Allows an objectObjectobject to attempt to free resources and perform other cleanup operations before the objectObjectobject is reclaimed by garbage collection. (Inherited from System.ObjectSystem.ObjectSystem::Object)
Public methodAttribute.GetHashCodeAttribute.GetHashCodeAttribute::GetHashCode Returns the hash code for this instance. (Overrides Object.GetHashCodeObject.GetHashCodeObject::GetHashCode)
Public methodObject.GetTypeObject.GetTypeObject::GetType Gets the TypeTypeType of the current instance. (Inherited from System.ObjectSystem.ObjectSystem::Object)
Public methodAttribute.IsDefaultAttributeAttribute.IsDefaultAttributeAttribute::IsDefaultAttribute When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from System.AttributeSystem.AttributeSystem::Attribute)
Public methodAttribute.MatchAttribute.MatchAttribute::Match When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from System.AttributeSystem.AttributeSystem::Attribute)
Protected methodObject.MemberwiseCloneObject.MemberwiseCloneObject::MemberwiseClone Creates a shallow copy of the current objectObjectobject. (Inherited from System.ObjectSystem.ObjectSystem::Object)
Public methodObject.ToStringObject.ToStringObject::ToString Returns a stringStringString that represents the current objectObjectobject. (Inherited from System.ObjectSystem.ObjectSystem::Object)

Top

Explicit Interface Implementations

 NameDescription
Explicit interface implementationPrivate methodAttribute.GetIDsOfNamesAttribute.GetIDsOfNamesAttribute::GetIDsOfNames Maps a set of names to a corresponding set of dispatch identifiers. (Inherited from System.AttributeSystem.AttributeSystem::Attribute)
Explicit interface implementationPrivate methodAttribute.GetTypeInfoAttribute.GetTypeInfoAttribute::GetTypeInfo Retrieves the type information for an object, which can be used to get the type information for an interface. (Inherited from System.AttributeSystem.AttributeSystem::Attribute)
Explicit interface implementationPrivate methodAttribute.GetTypeInfoCountAttribute.GetTypeInfoCountAttribute::GetTypeInfoCount Retrieves the number of type information interfaces that an object provides (either 0 or 1). (Inherited from System.AttributeSystem.AttributeSystem::Attribute)
Explicit interface implementationPrivate methodAttribute.InvokeAttribute.InvokeAttribute::Invoke Provides access to properties and methods exposed by an object. (Inherited from System.AttributeSystem.AttributeSystem::Attribute)

Top

Remarks

This attribute is ignored unless the containing method is marked with the XdmFunctionAttributeXdmFunctionAttributeXdmFunctionAttribute, and the containing object is marked with XdmModuleAttributeXdmModuleAttributeXdmModuleAttribute.

The type specified by this attribute must be a subtype of the primitive base type of the XDM type represented by the CLR type of the argument or return value of the function annotated with this annotation. For example if a function has an argument with CLR type intIntegerint then its XDM type is xs:int, whose primitive base type is xs:integer. This means that the argument can be annotated with any subtype of xs:integer.

If an argument or return value has a CLR type that is a subtype of XPathItemXPathItemXPathItem (for example XPathNavigatorXPathNavigatorXPathNavigator) then the type that can be specified by this attribute must be representable by the argument.

If at runtime a value passed to an argument cannot be converted from the declared type to the CLR type then an ANDY1000 error is raised at runtime. Similarly if a value returned from a function cannot be converted to its declared type, or if a value returned is of a type annotated with XDM type information (for example XPathAtomicValueXPathAtomicValueXPathAtomicValue) and is not a subtype of the functions declared type then an ANDY1000 error is raised at runtime.