<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FFunctionRegistry%2FRegisterFunction_%28String%2C_FunctionCallback%29</id>
	<title>Dice/FunctionRegistry/RegisterFunction (String, FunctionCallback) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FFunctionRegistry%2FRegisterFunction_%28String%2C_FunctionCallback%29"/>
	<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/FunctionRegistry/RegisterFunction_(String,_FunctionCallback)&amp;action=history"/>
	<updated>2026-05-03T05:24:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://skizzerz.net/DiceRoller/index.php?title=Dice/FunctionRegistry/RegisterFunction_(String,_FunctionCallback)&amp;diff=695&amp;oldid=prev</id>
		<title>Skizzerz: Created page with &quot;{{APIdoc|FunctionRegistry.RegisterFunction Method (String, FunctionCallback)}} Registers the specified global callback to the given name.  {{ns}}  == Syntax == &lt;syntaxhighligh...&quot;</title>
		<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/FunctionRegistry/RegisterFunction_(String,_FunctionCallback)&amp;diff=695&amp;oldid=prev"/>
		<updated>2017-04-24T19:23:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{APIdoc|FunctionRegistry.RegisterFunction Method (String, FunctionCallback)}} Registers the specified global callback to the given name.  {{ns}}  == Syntax == &amp;lt;syntaxhighligh...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{APIdoc|FunctionRegistry.RegisterFunction Method (String, FunctionCallback)}}&lt;br /&gt;
Registers the specified global callback to the given name.&lt;br /&gt;
&lt;br /&gt;
{{ns}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt;&lt;br /&gt;
public void RegisterFunction(&lt;br /&gt;
    string name,&lt;br /&gt;
    FunctionCallback callback&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
; ''name''&lt;br /&gt;
: Type: System.String&lt;br /&gt;
: Function name to register. Function names are case-insensitive.&lt;br /&gt;
&lt;br /&gt;
; ''callback''&lt;br /&gt;
: Type: [[Dice/FunctionCallback|Dice.FunctionCallback]]&lt;br /&gt;
: The method to be called whenever the function is called in a dice expression.&lt;br /&gt;
&lt;br /&gt;
== Exceptions ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Exception !! Condition&lt;br /&gt;
|-&lt;br /&gt;
| ArgumentNullException || ''name'' is {{cs|null}}.&lt;br /&gt;
|-&lt;br /&gt;
| ArgumentException || ''name'' is the empty string.&lt;br /&gt;
|-&lt;br /&gt;
| InvalidOperationException || A global function with the same ''name'' has already been registered.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
This registers a new global function with the given name (FunctionScope.Global).&lt;br /&gt;
&lt;br /&gt;
There can only be one callback associated with any given function name and scope. It is an error to re-register a function, but a function can be [[../Remove|removed]] and then registered again.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[../RegisterFunction|RegisterFunction overload summary]]&lt;/div&gt;</summary>
		<author><name>Skizzerz</name></author>
		
	</entry>
</feed>