### Saxon.Api

- BinaryResource
- CatalogCollection
- DirectoryCollection
- DocumentBuilder
- DomDestination
- DynamicContext
- DynamicError
- EmptyEnumerator<T>
- ErrorReporter
- ErrorReporterToStaticError
- ErrorReporterWrapper
- ExtensionFunction
- ExtensionFunctionCall
- ExtensionFunctionDefinition
- Feature<T>
- FeatureKeys
- HostLanguage
- ICollectionFinder
- IErrorReporter
- IInvalidityHandler
- IMessageListener
- IMessageListener2
- InvalidityHandlerWrapper
- IPredicate<in XdmItem>
- IQueryResolver
- IResource
- IResourceCollection
- IResourceFactory
- IResultDocumentHandler
- IXmlLocation
- JarCollection
- NamespaceConstant
- NullDestination
- Predicate<T>
- Predicates
- Processor
- QName
- RawDestination
- RecoveryPolicy
- Resource
- ResourceCollection
- SchemaManager
- SchemaResolver
- SchemaValidationMode
- SchemaValidator
- Serializer
- StandardCollectionFinder
- StandardLogger
- StaticContext
- StaticError
- Step<TInput, TResult>
- Steps
- TextWriterDestination
- TreeModel
- URIQueryParameters
- ValidationFailure
- WhitespacePolicy
- XdmAnyArrayType
- XdmAnyFunctionType
- XdmAnyItemType
- XdmAnyMapType
- XdmAnyNodeType
- XdmArray
- XdmAtomicType
- XdmAtomicValue
- XdmAxis
- XdmDestination
  - - TreeProtector
- XdmEmptySequence
- XdmExternalObjectValue
- XdmFunctionItem
- XdmItem
- XdmItemType
- XdmMap
- XdmNode
- XdmNodeKind
- XdmSequenceType
- XdmValue
- XmlDestination
- XmlProcessingError
- XmlResource
- XPathCompiler
- XPathExecutable
- XPathSelector
- XQueryCompiler
- XQueryEvaluator
- XQueryExecutable
- Xslt30Transformer
- XsltCompiler
- XsltExecutable
  - - ParameterDetails
- XsltPackage
- XsltTransformer

### Saxon.Api

# Interface ExtensionFunction

public interface ExtensionFunction

This is an interface for simple external/extension functions. Users can implement this interface and register the implementation with the Processor; the function will then be available for calling from all queries, stylesheets, and XPath expressions compiled under this Processor.

Extension functions implemented using this interface are expected to be free of side-effects, and to have no dependencies on the static or dynamic context. A richer interface for extension functions is provided via the ExtensionFunctionDefinition class.

### Method Summary
XdmValue | Call(XdmValue[] arguments) Method called at run time to evaluate the function.
XdmSequenceType[] | GetArgumentTypes() Declare the type of the arguments
QName | GetName() Return the name of the external function
XdmSequenceType | GetResultType() Declare the result type of the external function

## Method Detail

### Call

public XdmValue Call(XdmValue[] arguments)

Method called at run time to evaluate the function.

Parameters:

`arguments` - The values of the arguments supplied in the XPath function call.

Returns:

An `XdmValue`, representing the result of the extension function. (Note: in many cases it will be convenient to return an `XdmAtomicValue` or `XdmNode`, both of which are instances of `XdmValue`).

### GetArgumentTypes

public XdmSequenceType[] GetArgumentTypes()

Declare the type of the arguments

Returns:

an array of `XdmSequenceType` objects, one for each argument to the function, representing the expected types of the arguments

### GetName

public QName GetName()

Return the name of the external function

Returns:

the name of the function, as a `QName`

### GetResultType

public XdmSequenceType GetResultType()

Declare the result type of the external function

Returns:

the result type of the external function