C# Класс System.Xml.Xsl.Runtime.XmlExtensionFunction

This internal class contains methods that allow binding to extension functions and invoking them.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Bind() публичный Метод

Bind to the CLR type specified in the Init() call. If a matching method cannot be found, throw an exception.
public Bind ( ) : void
Результат void

CanBind() публичный Метод

Return true if the CLR type specified in the Init() call has a matching method.
public CanBind ( ) : bool
Результат bool

Equals() публичный Метод

Return true if this XmlExtensionFunction has the same values as another XmlExtensionFunction.
public Equals ( object other ) : bool
other object
Результат bool

GetClrArgumentType() публичный Метод

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
Результат System.Type

GetHashCode() публичный Метод

Return this object's hash code, previously computed for performance.
public GetHashCode ( ) : int
Результат int

GetXmlArgumentType() публичный Метод

Once Bind has been successfully called, the inferred Xml types of the arguments can be accessed.
public GetXmlArgumentType ( int index ) : XmlQueryType
index int
Результат XmlQueryType

Init() публичный Метод

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
Результат void

Invoke() публичный Метод

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
Результат object

XmlExtensionFunction() публичный Метод

Constructor.
public XmlExtensionFunction ( ) : System
Результат System

XmlExtensionFunction() публичный Метод

Constructor (directly binds to passed MethodInfo).
public XmlExtensionFunction ( string name, string namespaceUri, MethodInfo meth ) : System
name string
namespaceUri string
meth System.Reflection.MethodInfo
Результат System

XmlExtensionFunction() публичный Метод

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
Результат System