C# Class System.Xml.Xsl.Runtime.XmlExtensionFunction

This internal class contains methods that allow binding to extension functions and invoking them.
Afficher le fichier Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Méthodes publiques

Méthode Description
Bind ( ) : void

Bind to the CLR type specified in the Init() call. If a matching method cannot be found, throw an exception.

CanBind ( ) : bool

Return true if the CLR type specified in the Init() call has a matching method.

Equals ( object other ) : bool

Return true if this XmlExtensionFunction has the same values as another XmlExtensionFunction.

GetClrArgumentType ( int index ) : Type

Once Bind has been successfully called, the Clr type of each argument can be accessed. Note that this may be different than Method.GetParameterInfo().ParameterType.

GetHashCode ( ) : int

Return this object's hash code, previously computed for performance.

GetXmlArgumentType ( int index ) : XmlQueryType

Once Bind has been successfully called, the inferred Xml types of the arguments can be accessed.

Init ( string name, string namespaceUri, int numArgs, Type objectType, BindingFlags flags ) : void

Initialize, but do not bind.

Invoke ( object extObj, object args ) : object

Convert the incoming arguments to an array of CLR objects, and then invoke the external function on the "extObj" object instance.

XmlExtensionFunction ( ) : System

Constructor.

XmlExtensionFunction ( string name, string namespaceUri, MethodInfo meth ) : System

Constructor (directly binds to passed MethodInfo).

XmlExtensionFunction ( string name, string namespaceUri, int numArgs, Type objectType, BindingFlags flags ) : System

Constructor.

Private Methods

Méthode Description
Bind ( MethodInfo meth ) : void

Bind to the specified MethodInfo.

GetClrType ( Type clrType ) : Type

1. Map enumerations to the underlying integral type. 2. Throw an exception if the type is ByRef

InferXmlType ( Type clrType ) : XmlQueryType

Infer an Xml type from a Clr type using Xslt infererence rules

Method Details

Bind() public méthode

Bind to the CLR type specified in the Init() call. If a matching method cannot be found, throw an exception.
public Bind ( ) : void
Résultat void

CanBind() public méthode

Return true if the CLR type specified in the Init() call has a matching method.
public CanBind ( ) : bool
Résultat bool

Equals() public méthode

Return true if this XmlExtensionFunction has the same values as another XmlExtensionFunction.
public Equals ( object other ) : bool
other object
Résultat bool

GetClrArgumentType() public méthode

Once Bind has been successfully called, the Clr type of each argument can be accessed. Note that this may be different than Method.GetParameterInfo().ParameterType.
public GetClrArgumentType ( int index ) : Type
index int
Résultat System.Type

GetHashCode() public méthode

Return this object's hash code, previously computed for performance.
public GetHashCode ( ) : int
Résultat int

GetXmlArgumentType() public méthode

Once Bind has been successfully called, the inferred Xml types of the arguments can be accessed.
public GetXmlArgumentType ( int index ) : XmlQueryType
index int
Résultat XmlQueryType

Init() public méthode

Initialize, but do not bind.
public Init ( string name, string namespaceUri, int numArgs, Type objectType, BindingFlags flags ) : void
name string
namespaceUri string
numArgs int
objectType System.Type
flags BindingFlags
Résultat void

Invoke() public méthode

Convert the incoming arguments to an array of CLR objects, and then invoke the external function on the "extObj" object instance.
public Invoke ( object extObj, object args ) : object
extObj object
args object
Résultat object

XmlExtensionFunction() public méthode

Constructor.
public XmlExtensionFunction ( ) : System
Résultat System

XmlExtensionFunction() public méthode

Constructor (directly binds to passed MethodInfo).
public XmlExtensionFunction ( string name, string namespaceUri, MethodInfo meth ) : System
name string
namespaceUri string
meth System.Reflection.MethodInfo
Résultat System

XmlExtensionFunction() public méthode

Constructor.
public XmlExtensionFunction ( string name, string namespaceUri, int numArgs, Type objectType, BindingFlags flags ) : System
name string
namespaceUri string
numArgs int
objectType System.Type
flags BindingFlags
Résultat System