Net.Definitions Namespace
This namespace is for the Definitions feature.
Definitions.Create(definitions)#
Function
- Parameters- remotesAn object of remote definitions. See definitions for usage.
- globalMiddleware(optional) A collection of global middleware to apply to all remotes in this definition
 
- Returns a DefinitionsCreateResult
Example
Definitions.ServerFunction<Server>(...)#
Definition function for creating a FunctionDefinition
Definitions.ServerToClientEvent<ServerArgs>(...)#
Definition function for creating an ServerEventDeclaration
Definitions.ClientToServerEvent<ClientArgs>(...)#
Definition function for creating an ClientEventDeclaration
Definitions.BidirectionalEvent<ServerArgs, ClientArgs>(...)#
Definition function for creating an BidirectionalEventDeclaration
Definitions.ServerAsyncFunction<Server>(...)#
Definition function for creating an ServerAsyncFunctionDefinition
Definitions.Namespace(definitions)#
Creates a group of definitions (returns DeclarationNamespace)
DefinitionsCreateResult<T>#
Contains the definition builders for a given definition (returned using Create in Net.Definitions)
Server#
A ServerDefinitionBuilder object.
Client#
A ClientDefinitionBuilder object.
ServerDefinitionBuilder<T>#
Contains all the definition builders for server-side events and functions.
Create(name)#
Will get the specified event by name, and return it. The returned object will be the type provided in the definition.
OnFunction(name, callback)#
Similar to Create but only works on events, and is pretty much a shortcut for Create(name).SetCallback(callback)
OnEvent(name, callback)#
Similar to Create but only works on events, and is pretty much a shortcut for Create(name).Connect(callback)
GetNamespace(name)#
Gets a child namespace under this namespace
ClientDefinitionBuilder<T>#
Contains all the definition builders for server-side events and functions.
Get(name)#
Will get the specified event by name, and return it. The returned object will be the type provided in the definition.
Gets the specified remote definition and gets the client version of the event/function/asyncfunction
OnEvent(name, callback)#
Similar to Get but only works on events, and is pretty much a shortcut for Create(name).Connect(callback)
GetNamespace(name)#
Gets a child namespace under this namespace