-
Notifications
You must be signed in to change notification settings - Fork 24
API Reference
AuthenticationRequestMessage | AuthenticationResponseMessage | Credential |
IAuthenticationProvider | RemotingIdentity |
IClientChannel | IRawMessageTransport | IServerChannel |
NetworkException |
RpcWebsocketSharpBehavior | WebsocketClientChannel | WebsocketServerChannel |
RemotingConfiguration | RemotingServices |
WellKnownServiceTypeEntry |
CastleWindsorDependencyInjectionContainer | DependencyInjectionContainerExtensions |
IDependencyInjectionContainer | MicrosoftDependencyInjectionContainer |
ServiceLifetime |
AesEncryption | EncryptedSecret | RsaKeyExchange |
RsaKeyPair | RsaSignature | SignedMessageData |
ISerializerAdapter |
BsonSerializerAdapter | BsonSerializerConfig | Envelope |
Describes an authentication request message.
Get or sets an array of credentials for authentication.
Describes an authentication response message.
Get or sets the authenticated identity.
Gets or sets whether authentication was successful.
Describes an authentication credential.
Gets or sets the name of the credential (e.g. "password").
Get or sets the value of the credential (e.g. "secret").
Interface for authentication providers.
Authenticates the provided credentials and returns the authenticated identity, if successful.
Name | Description |
---|---|
credentials |
CoreRemoting.Authentication.Credential[] Array of credentials |
authenticatedIdentity |
CoreRemoting.Authentication.RemotingIdentity@ Authenticated Identity |
Indicates whether the authentication was successful.
Identity authenticated by a CoreRemoting server.
Gets or sets a string, that describes the authentication type.
Gets or sets the optional domain or realm name of the identity.
Gets or sets whether the identity was successful authenticated or not.
Gets or sets the name of the identity.
Gets or sets an array of roles, the identity is member of.
Provides a way to set contextual data that flows with the call and async context of a invocation.
Retrieves an object with the specified name from the CallContext.
Name | Description |
---|---|
name |
System.String The name of the item in the call context. |
The object in the call context associated with the specified name, or if not found.
Gets a serializable snapshot of the current call context.
Array of call context entries
Restore the call context from a snapshot.
Name | Description |
---|---|
entries |
System.Collections.Generic.IEnumerable{CoreRemoting.CallContextEntry} Call context entries |
Stores a given object and associates it with the specified name.
Name | Description |
---|---|
name |
System.String The name with which to associate the new item in the call context. |
data |
System.Object The object to store in the call context. |
Describes a single call context entry.
Gets or sets the name of the call context entry.
Gets or sets the value of the call context entry.
Interface for CoreRemoting client side transport channel.
Establish a connection with the server.
Closes the connection.
Initializes the channel.
Name | Description |
---|---|
client |
CoreRemoting.IRemotingClient CoreRemoting client |
Gets whether the connection is established or not.
Gets the raw message transport component for this connection.
Interface to be implemented by raw message transport components.
Event: Fires when an error is occurred.
Gets or sets the last exception.
Event: Fires when a message is received from server.
Sends a message to the server.
Name | Description |
---|---|
rawMessage |
System.Byte[] Raw message data |
Interface for CoreRemoting server side transport channel.
Initializes the channel.
Name | Description |
---|---|
server |
CoreRemoting.IRemotingServer CoreRemoting sever |
Gets whether the channel is listening or not.
Start listening for client requests.
Stop listening for client requests.
Exception that is thrown when a network operation is failed.
Without this constructor, deserialization will fail.
Name | Description |
---|---|
info |
System.Runtime.Serialization.SerializationInfo Serialization info |
context |
System.Runtime.Serialization.StreamingContext Streaming context |
Creates a new instance of the NetworkException class.
Name | Description |
---|---|
message |
System.String Error message |
innerEx |
System.Exception Optional inner exception |
Executes RPC calls from clients.
Initializes the RPC service instance.
Name | Description |
---|---|
server |
CoreRemoting.IRemotingServer Remoting server instance, which is hosting the service to call |
Closes the internal websocket session.
Frees managed resources.
Event: Fires when an error is occurred.
Gets or sets the last exception.
Event procedure: Called, if an error occurs at the websocket layer.
Name | Description |
---|---|
e |
WebSocketSharp.ErrorEventArgs Message and optional Exception info |
Called when a message from a client is received.
Name | Description |
---|---|
e |
WebSocketSharp.MessageEventArgs Metadata and the message from client |
Event: Fired when a message is received via websocket.
Sends a message over the websocket.
Name | Description |
---|---|
rawMessage |
System.Byte[] Raw data of the message |
Client side websocket channel implementation.
Establish a websocket connection with the server.
Closes the websocket connection.
Disconnect and free manages resources.
Event: Fires when an error is occurred.
Initializes the channel.
Name | Description |
---|---|
client |
CoreRemoting.IRemotingClient CoreRemoting client |
Gets whether the websocket connection is established or not.
Gets or sets the last exception.
Event procedure: Called when a error occurs on the websocket layer.
Name | Description |
---|---|
sender |
System.Object |
e |
WebSocketSharp.ErrorEventArgs |
Event procedure: Called when a message from server is received.
Name | Description |
---|---|
sender |
System.Object Sender of the event |
e |
WebSocketSharp.MessageEventArgs Event arguments containing the message content |
Gets the raw message transport component for this connection.
Event: Fires when a message is received from server.
Sends a message to the server.
Name | Description |
---|---|
rawMessage |
System.Byte[] Raw message data |
Server side websocket channel implementation.
Stops listening and frees managed resources.
Initializes the channel.
Name | Description |
---|---|
server |
CoreRemoting.IRemotingServer CoreRemoting sever |
Gets whether the channel is listening or not.
Start listening for client requests.
Stop listening for client requests.
Configuration element for a CoreRemoting client instance.
Gets or sets the authentication timeout in seconds (0 means infinite).
Gets or sets the type of the client channel which should be used for communication.
Gets or sets the connection timeout in seconds (0 means infinite).
Gets or sets the invocation timeout in seconds (0 means infinite).
Gets or set whether this is the default client.
Gets or sets the RSA key size for message encryption.
Gets or set whether messages should be encrypted or not.
Gets or sets the name of the serializer which should be used by the client instance.
Gets or sets the server hostname.
Gets or sets the server network port.
Gets or sets the unique name of the client instance.
Collection of ClientInstanceConfigElement objects.
Creates a new element.
New ClientInstanceConfigElement object
Get the unique key of a specified element.
Name | Description |
---|---|
element |
System.Configuration.ConfigurationElement Configuration element |
Unique key
Gets an element of the collection by its index.
Name | Description |
---|---|
index |
Unknown type Numeric index (zero based) |
Gets an element of the collection by its string key.
Name | Description |
---|---|
key |
Unknown type Unique string key of the element |
Extension methods for XML configuration classes.
Creates a client channel from a type string.
Name | Description |
---|---|
channelTypeName |
System.String String containing a channel type shortcut (e.g. "ws" for websockets) or a type name and assembly name, separated by a comma |
Client channel
Creates a serializer adapter from a type string.
Name | Description |
---|---|
serializerName |
System.String String containing a serializer (e.g. "binary" for a binary serializer) type shortcut or a type name and assembly name, separated by a comma |
Creates a server channel from a type string.
Name | Description |
---|---|
channelTypeName |
System.String String containing a channel type shortcut (e.g. "ws" for websockets) or a type name and assembly name, separated by a comma |
Server channel
Gets a type from a string that contains type name and assembly name.
Name | Description |
---|---|
assemblyAndTypeConfigString |
System.String String containing type name and assembly name, separated by a comma |
Type object
System.FormatException: Thrown, if string format is invalid
Converts a client XML config object into a ClientConfig object.
Name | Description |
---|---|
configElement |
CoreRemoting.ClassicRemotingApi.ConfigSection.ClientInstanceConfigElement Configuration element |
ClientConfig object
Converts a server XML config object into a ServerConfig object.
Name | Description |
---|---|
configElement |
CoreRemoting.ClassicRemotingApi.ConfigSection.ServerInstanceConfigElement Configuration element |
ServerConfig object
Converts a wellknown service XML config object into a WellknownServiceTypeEntry object.
Name | Description |
---|---|
configElement |
CoreRemoting.ClassicRemotingApi.ConfigSection.WellKnownServiceConfigElement Service definition from XML config |
WellknownServiceTypeEntry object
Defines a configuration section for CoreRemoting configuration in a XML config file.
Gets a collection of configured CoreRemoting client instances.
Gets a collection of configured CoreRemoting server instances.
Gets a collection of configured CoreRemoting services.
Configuration element for a CoreRemoting server instance.
Gets or sets the type of authentication provider which should be used to authenticate client credentials.
Gets or sets whether authentication is required or not.
Gets or sets the type of the server channel which should be used for communication.
Gets or sets the hostname the server instance is bound to.
Gets or set whether this is the default server.
Gets or sets the RSA key size for message encryption.
Gets or set whether messages should be encrypted or not.
Gets or sets the network port on which the server instance is listening on.
Gets or sets the name of the serializer which should be used by the server instance.
Gets or sets the unique name of the server instance.
Collection of ServerInstanceConfigElement objects.
Creates a new element.
New ServerInstanceConfigElement object
Get the unique key of a specified element.
Name | Description |
---|---|
element |
System.Configuration.ConfigurationElement Configuration element |
Unique key
Gets an element of the collection by its index.
Name | Description |
---|---|
index |
Unknown type Numeric index (zero based) |
Gets an element of the collection by its string key.
Name | Description |
---|---|
key |
Unknown type Unique string key of the element |
Configuration element for a wellknown CoreRemoting service.
Get or sets the assembly of the service's implementation assembly.
Gets or sets the implementation type of the service.
Get or sets the assembly name of the service’s interface assembly.
Get or sets the type name of the service interface.
Gets or sets the service's lifetime.
Gets or sets the unique service name.
Gets or sets the unique name of the server hosting this service.
Collection of WellKnownServiceConfigElement objects.
Creates a new element.
New WellKnownServiceConfigElement object
Get the unique key of a specified element.
Name | Description |
---|---|
element |
System.Configuration.ConfigurationElement Configuration element |
Unique key
Gets an element of the collection by its index.
Name | Description |
---|---|
index |
Unknown type Numeric index (zero based) |
Gets an element of the collection by its string key.
Name | Description |
---|---|
key |
Unknown type Unique string key of the element |
Provides CoreRemoting configuration in classic .NET Remoting style.
Applies CoreRemoting server configuration from config file.
Name | Description |
---|---|
fileName |
System.String Path to XML configuration file (Default EXE configuration file will be used, if empty) |
credentials |
CoreRemoting.Authentication.Credential[] Optional credentials for authentication |
Gets a registered client instance by its unique name.
Name | Description |
---|---|
uniqueClientInstanceName |
System.String Unique client instance name |
CoreRemoting client
Gets a registered server instance by its unique name.
Name | Description |
---|---|
uniqueServerInstanceName |
System.String Unique server instance name |
CoreRemoting server
Registers a new CoreRemoting client instance and returns it's unique instance name.
Name | Description |
---|---|
config |
CoreRemoting.ClientConfig Client configuration |
Unique client instance name
Gets a list of currently registered CoreRemoting client instances.
Gets a list of currently registered CoreRemoting server instances.
Registers a new CoreRemoting server instance and returns it's unique instance name.
Name | Description |
---|---|
config |
CoreRemoting.ServerConfig Server configuration |
Unique server instance name
Registers a service.
Name | Description |
---|---|
entry |
CoreRemoting.ClassicRemotingApi.WellKnownServiceTypeEntry Service configuration data |
System.ArgumentNullException: Thrown if parameter 'entry' is null
RegisterWellKnownServiceType(interfaceType, implementationType, lifetime, serviceName, uniqueServerInstanceName)
Registers a service.
Name | Description |
---|---|
interfaceType |
System.Type Service interface type |
implementationType |
System.Type Service implementation type |
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime LIfetime (SingleCall / Singleton) |
serviceName |
System.String Unique name of the service (Full name of interface type is used, if left blank) |
uniqueServerInstanceName |
System.String Unique instance name of the CoreRemoting server that should used for hosting this service |
Shutdown all registered clients and servers.
Unregisters a CoreRemoting client.
Name | Description |
---|---|
uniqueClientInstanceName |
System.String Unique name of the client instance |
Unregisters a CoreRemoting server.
Name | Description |
---|---|
uniqueServerInstanceName |
System.String Unique name of the server instance |
Provides several methods for using and publishing remoted objects and proxies.
Creates a proxy for a remote CoreRemoting service.
Name | Description |
---|---|
interfaceType |
System.Type Service interface type |
serviceName |
System.String Optional service name |
uniqueClientInstanceName |
System.String Unique client instance name (Default client is used if empty) |
Proxy
Returns a Boolean value that indicates whether the client that called the method specified in the given message is waiting for the server to finish processing the method before continuing execution.
Name | Description |
---|---|
method |
System.Reflection.MethodBase The method in question |
True if the method is one way; otherwise, false.
Returns a Boolean value that indicates whether the given object is a transparent proxy or a real object.
Name | Description |
---|---|
proxy |
System.Object The reference to the object to check. |
A Boolean value that indicates whether the object specified in the proxy parameter is a transparent proxy or a real object.
Registers a object as CoreRemoting service.
Name | Description |
---|---|
serviceInstance |
System.Object Object instance that should be registered as service |
serviceName |
System.String Unique service name (Interface full type name is used, if left blank) |
interfaceType |
System.Type Service interface type |
uniqueServerInstanceName |
System.String Unique server instance name |
Service name
Describes a wellknown service.
Constructor(interfaceAssemblyName, interfaceTypeName, implementationAssemblyName, implementationTypeName, lifetime, serviceName, uniqueServerInstanceName)
Creates a new instance of the WellKnownServiceTypeEntry class.
Name | Description |
---|---|
interfaceAssemblyName |
System.String Interface assembly name of the service |
interfaceTypeName |
System.String Interface type name of the service |
implementationAssemblyName |
System.String Implementation assembly name of the service |
implementationTypeName |
System.String Implementation type name of the service |
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Lifetime of the service (Singleton / SingleCall) |
serviceName |
System.String Unique service name (Full name of the interface type is used, when left blank) |
uniqueServerInstanceName |
System.String Unique instance name of the host server (default server is used, if left blank) |
Gets or sets the implementation assembly name.
Gets or sets the implementation type name.
Gets or sets the interface assembly name.
Gets or sets the interface type name.
Gets or sets the service's lifetime.
Gets or sets the unique service name (Full name of interface type is used, if left blank).
Gets or sets the unique instance name of the host server.
Provides configuration settings for a CoreRemoting client instance.
Creates a new instance of the ClientConfig class.
Gets or sets the authentication timeout in seconds (0 means infinite).
Gets or sets the client channel to be used for transport of messages over the wire (WebsocketClientChannel is used, if set to null).
Gets or sets the connection timeout in seconds (0 means infinite).
Gets or sets an array of credentials for authentication (depends on the authentication provider used on server side).
Gets or sets the invocation timeout in seconds (0 means infinite).
Gets or set whether this is the default client.
Gets or sets an interval in seconds to keep session alive, even on idle (session is not kept alive if set to 0).
Gets or sets the key size for asymmetric encryption (only relevant, if message encryption is enabled).
Gets or sets whether messages should be encrypted or not.
Gets or sets the serializer to be used (BSON serializer is used, if set to null).
Gets or sets the host name of the CoreRemoting server to be connected to.
Gets or sets the network port of the CoreRemoting server to be connected to.
Gets or sets the unqiue name of the configured client instance.
Describes the client side context of a RPC call.
Creates a new instance of the ClientRpcContext class.
Frees managed resources.
Gets or sets whether this RPC call is in error state.
Gets or sets an exception that describes an error that occurred on server side RPC invocation.
Gets or sets the result message, that was received from server after the call was invoked on server side.
Gets the unique key of RPC call.
Gets a wait handle that is set, when the response of this RPC call is received from server.
Castle Windsor DI-Container-Wrapper.
Creates a new instance of the CastleWindsorDependencyInjectionContainer class.
Frees managed resources.
Gets all registered types.
Enumerable list of registered types
Gets a service instance by service name.
Name | Description |
---|---|
serviceName |
System.String Unique service name |
Service instance
Gets a service instance of a specified interface type.
Name | Description |
---|---|
serviceName |
System.String Optional unique service name (Full name of interface type is used, if left blank) |
- TServiceInterface - Service interface type
Service instance
Gets the service interface type of a specified service.
Name | Description |
---|---|
serviceName |
System.String Unique service name |
Service interface type
Gets whether the specified service is registered or not.
Name | Description |
---|---|
serviceName |
System.String Unique service name (Full service interface type name is used, if left blank) |
- TServiceInterface - Service interface type
True, if the service is registered, otherwise false
Registers a service.
Name | Description |
---|---|
factoryDelegate |
System.Func{``0} Factory delegate, which is called to create service instances |
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Service lifetime (Singleton / SingleCall) |
serviceName |
System.String Optional unique service name |
- TServiceInterface - Service interface type
Registers a service.
Name | Description |
---|---|
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Service lifetime (Singleton / SingleCall) |
serviceName |
System.String Optional unique service name |
- TServiceInterface - Service interface type
- TServiceImpl - Service implementation type
Provides extension methods for dependency injection containers.
Gets the method info of the RegisterService method to register an object as service..
Name | Description |
---|---|
container |
CoreRemoting.DependencyInjection.IDependencyInjectionContainer DI container |
interfaceType |
System.Type Service interface type |
serviceInstance |
System.Object Service instance |
Method info of the RegisterService method
System.ArgumentNullException: Thrown if container is set to null
Gets the method info of the RegisterService method.
Name | Description |
---|---|
container |
CoreRemoting.DependencyInjection.IDependencyInjectionContainer DI container |
interfaceType |
System.Type Service interface type |
implementationType |
System.Type Service implementation type |
Method info of the RegisterService method
System.ArgumentNullException: Thrown if container is set to null
Interface to be implemented by dependency injection container integration classes.
Gets all registered types.
Enumerable list of registered types
Gets a service instance by service name.
Name | Description |
---|---|
serviceName |
System.String Unique service name |
Service instance
Gets a service instance of a specified interface type.
Name | Description |
---|---|
serviceName |
System.String Optional unique service name (Full name of interface type is used, if left blank) |
- TServiceInterface - Service interface type
Service instance
Gets the service interface type of a specified service.
Name | Description |
---|---|
serviceName |
System.String Unique service name |
Service interface type
Gets whether the specified service is registered or not.
Name | Description |
---|---|
serviceName |
System.String Unique service name (Full service interface type name is used, if left blank) |
- TServiceInterface - Service interface type
True, if the service is registered, otherwise false
Registers a service.
Name | Description |
---|---|
factoryDelegate |
System.Func{``0} Factory delegate, which is called to create service instances |
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Service lifetime (Singleton / SingleCall) |
serviceName |
System.String Optional unique service name |
- TServiceInterface - Service interface type
Registers a service.
Name | Description |
---|---|
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Service lifetime (Singleton / SingleCall) |
serviceName |
System.String Optional unique service name |
- TServiceInterface - Service interface type
- TServiceImpl - Service implementation type
Microsoft Dependency Injection DI-Container-Wrapper.
Creates a new instance of the MicrosoftDependencyInjectionContainer class.
Name | Description |
---|---|
serviceCollection |
Microsoft.Extensions.DependencyInjection.IServiceCollection Service collection |
Frees managed resources.
Gets all registered types.
Enumerable list of registered types
Gets a service instance by service name.
Name | Description |
---|---|
serviceName |
System.String Unique service name |
Service instance
Gets a service instance of a specified interface type.
Name | Description |
---|---|
serviceName |
System.String Optional unique service name (Full name of interface type is used, if left blank) |
- TServiceInterface - Service interface type
Service instance
Gets the service interface type of a specified service.
Name | Description |
---|---|
serviceName |
System.String Unique service name |
Service interface type
Gets whether the specified service is registered or not.
Name | Description |
---|---|
serviceName |
System.String Unique service name (Full service interface type name is used, if left blank) |
- TServiceInterface - Service interface type
True, if the service is registered, otherwise false
Registers a service.
Name | Description |
---|---|
factoryDelegate |
System.Func{``0} Factory delegate, which is called to create service instances |
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Service lifetime (Singleton / SingleCall) |
serviceName |
System.String Optional unique service name |
- TServiceInterface - Service interface type
Registers a service.
Name | Description |
---|---|
lifetime |
CoreRemoting.DependencyInjection.ServiceLifetime Service lifetime (Singleton / SingleCall) |
serviceName |
System.String Optional unique service name |
- TServiceInterface - Service interface type
- TServiceImpl - Service implementation type
Describes the available service lifetime modes.
Every call is served by its own service instance.
On service instance serves all calls.
Provides methods to implement symmetric AES encryption.
Creates a SHA-256 hash of a specified value.
Name | Description |
---|---|
value |
System.Byte[] Value to be hashed |
SHA-256 hash
Decrypts raw data with AES.
Name | Description |
---|---|
encryptedData |
System.Byte[] Encrypted raw data |
sharedSecret |
System.Byte[] Shared secret |
iv |
System.Byte[] Initialization vector |
Decrypted raw data
System.NotSupportedException: Thrown if AES is not supported by the current system environment
Encrypts raw data with AES.
Name | Description |
---|---|
dataToEncrypt |
System.Byte[] Raw data to encrypt |
sharedSecret |
System.Byte[] Shared secret |
iv |
System.Byte[] Initialization vector |
Encrypted data
System.NotSupportedException: Thrown if AES is not supported by the current system environment
Generates an initialization vector.
Initialization vector
System.NotSupportedException: Thrown if AES is not supported by the current system environment
Describes an encrypted secret.
Creates a new instance of the EncryptedSecret class.
Name | Description |
---|---|
encryptedSessionKey |
System.Byte[] Encrypted session key |
iv |
System.Byte[] Initialization vector |
encryptedMessage |
System.Byte[] Encrypted message |
sendersPublicKeyBlob |
System.Byte[] Public key of the sender |
Gets the encrypted message.
Gets the encrypted session key.
Gets the initialization vector.
Gets the public key of the sender.
Provides methods to perform a RSA key exchange.
Decrypts a secret with asymmetric RSA algorithm.
Name | Description |
---|---|
keySize |
System.Int32 Key size (1024, 2048, 4096, ...) |
receiversPrivateKeyBlob |
System.Byte[] Private key of the receiver |
encryptedSecret |
CoreRemoting.Encryption.EncryptedSecret Encrypted secret |
Decrypted secret
Encrypts a secret with asymmetric RSA algorithm.
Name | Description |
---|---|
keySize |
System.Int32 Key size (1024, 2048, 4096, ...) |
receiversPublicKeyBlob |
System.Byte[] Public key of the receiver |
secretToEncrypt |
System.Byte[] Secret to encrypt |
sendersPublicKeyBlob |
System.Byte[] Public key of the sender (It's not needed to encrypt the secret, but to transfer the sender's public key to the receiver) |
Encrypted secret
Describes an RSA key pair.
Creates a new instance of the RsaKeyPair.
Name | Description |
---|---|
keySize |
System.Int32 Key size |
privateKey |
System.Byte[] Private key to import |
Creates a new instance of the RsaKeyPair.
Name | Description |
---|---|
keySize |
System.Int32 Key size |
Frees managed resources.
Gets the key size.
Gets the private RSA key.
Gets the public RSA key.
Provides methods to create and verify RSA signatures.
Creates a signature from the SHA256 hash value of the specified raw data. The private key of the provided key pair is used to create the signature.
Name | Description |
---|---|
keySize |
System.Int32 Key size (1024, 2048, 4096, ...) |
sendersPrivateKeyBlob |
System.Byte[] Private key of the sender |
rawData |
System.Byte[] Raw data to create a signature of |
Signature
Verifies a signature with the public key of the sender for the provided raw data.
Name | Description |
---|---|
keySize |
System.Int32 Key size (1024, 2048, 4096, ...) |
sendersPublicKeyBlob |
System.Byte[] Public key of the sender |
rawData |
System.Byte[] Raw data which signature of should be verified |
signature |
System.Byte[] The signature to verify |
True is the signature is valid, otherwise false
Container for raw message data and its RSA signature.
Gets or sets the unencrypted raw message data.
Get or sets the RSA signature.
Interface of a CoreRemoting client.
Gets the configuration settings used by the CoreRemoting client instance.
Connects this CoreRemoting client instance to the configured CoreRemoting server.
Creates a proxy object to provide access to a remote service.
Name | Description |
---|---|
serviceInterfaceType |
System.Type Interface type of the remote service |
serviceName |
System.String Unique name of the remote service |
Proxy object
Creates a proxy object to provide access to a remote service.
- T - Type of the shared interface of the remote service
Name | Description |
---|---|
serviceName |
System.String Unique name of the remote service |
Proxy object
Disconnects from the server. The server is actively notified about disconnection.
Gets whether this CoreRemoting client instance has a session or not.
Gets or sets the invocation timeout in milliseconds.
Gets whether the connection to the server is established or not.
Gets or sets whether messages should be encrypted or not.
Gets the public key of this CoreRemoting client instance.
Shuts a specified service proxy down and frees resources.
Name | Description |
---|---|
serviceProxy |
System.Object |
Interface of a CoreRemoting server.
Event: Fires after an RPC call is invoked.
Authenticates the specified credentials and returns whether the authentication was successful or not.
Name | Description |
---|---|
credentials |
CoreRemoting.Authentication.Credential[] Credentials to be used for authentication |
authenticatedIdentity |
CoreRemoting.Authentication.RemotingIdentity@ Authenticated identity (null when authentication fails) |
True when authentication was successful, otherwise false
Event: Fires before an RPC call is invoked.
Gets the configuration settings.
Event: Fires if an error occurs.
Gets the component for encryption and decryption of messages.
Gets the component for easy building of method call messages.
Gets the configured serializer.
Gets the dependency injection container that is used a service registry.
Gets the session repository to perform session management tasks.
Starts listening for client requests.
Stops listening for client requests and close all open client connections.
Gets the unique name of this server instance.
Interface to be implemented by service proxy classes.
Shuts the proxy object down. This is called from proxy objects finalizer because the proxy mimics its proxied interface.
Interface to be implemented by CoreRemoting session repository classes.
Creates a new session.
Name | Description |
---|---|
clientPublicKey |
System.Byte[] Client's public key |
clientAddress |
string Client's network address |
server |
CoreRemoting.IRemotingServer Server instance |
rawMessageTransport |
CoreRemoting.Channels.IRawMessageTransport Component that does the raw message transport |
The newly created session
Gets a specified session by its ID.
Name | Description |
---|---|
sessionId |
System.Guid Session ID |
The session correlating to the specified session ID
Gets the key size for asymmetric encryption. Should be 3072 or better in 2021 ;)
Removes a specified session by its ID.
Name | Description |
---|---|
sessionId |
System.Guid Session ID |
Gets a list of all sessions.
Provides extension methods for adding CoreRemoting as service to Microsoft dependency injection container.
Adds a CoreRemoting client as singleton to the service collection of a Microsoft dependency injection container.
Name | Description |
---|---|
services |
Microsoft.Extensions.DependencyInjection.IServiceCollection Service collection to which the client should be added |
config |
CoreRemoting.ClientConfig Configuration settings for the CoreRemoting client |
remoteServiceInterfaceTypes |
System.Type[] Array of remote service interface types for which proxy objects are to be added |
Adds a CoreRemoting server as singleton to the service collection of a Microsoft dependency injection container.
Name | Description |
---|---|
services |
Microsoft.Extensions.DependencyInjection.IServiceCollection Service collection to which the server should be added |
config |
CoreRemoting.ServerConfig Configuration settings for the CoreRemoting server |
Adds a CoreRemoting server with default config but a specified network port as singleton to the service collection of a Microsoft dependency injection container.
Name | Description |
---|---|
services |
Microsoft.Extensions.DependencyInjection.IServiceCollection Service collection to which the server should be added |
networkPort |
System.Int32 Network port on which the server should be listening for client requests |
Marks an method as one way method. This means that CoreRemoting client will not wait for result and CoreRemoting server will not send any result message (even in case of an error). One way methods are treated a fire-and-forget.
Pairs a client delegate with a service proxy instance.
Creates a new instance of the ClientDelegateInfo class.
Name | Description |
---|---|
clientDelegate |
System.Delegate Client delegate |
serviceProxy |
System.Object Proxy object of the remote service, which invokes the client delegate as callback |
Gets the client delegate.
Gets the service proxy.
Registry for client delegates paired with service proxies.
Creates a new instance of the ClientDelegateRegistry class.
Clear the entire client delegate registry.
Finds a specified registered client delegate and returns its unique handler key.
Name | Description |
---|---|
delegate |
System.Delegate Client delegate |
Unique handler key
Gets a registered client delegate by its handler key.
Name | Description |
---|---|
handlerKey |
System.Guid Unique handler key |
Client delegate
Registers a client delegate as callback target for remote delegate invocation.
Name | Description |
---|---|
clientDelegate |
System.Delegate Client delegate |
serviceProxy |
System.Object Service proxy of the remote service |
Unique handler key
System.ArgumentNullException: Thrown an argument is null
System.ApplicationException: Thrown, if a race condition occurs while adding the client delegate to the registry
Unregister a specified client delegate.
Name | Description |
---|---|
clientDelegate |
System.Delegate Client delegate |
Unregisters a specified client delegate by its handler key.
Name | Description |
---|---|
handlerKey |
System.Guid Unique handler key |
Unregisters all client delegates that are paired withe a specified service proxy.
Name | Description |
---|---|
serviceProxy |
System.Object Service proxy |
Proxy for intercepting calls on a specified delegate type.
Creates a new instance of the DelegateProxy class.
Name | Description |
---|---|
delegateType |
System.Type Delegate type to be proxied |
callInterceptionHandler |
System.Func{System.Object[],System.Object} Function to be called when intercepting calls on the delegate |
Creates a delegate for intercepting calls on a specified delegate type.
Name | Description |
---|---|
delegateType |
System.Type The delegate type to proxy |
interceptMethod |
System.Reflection.MethodInfo Method to call when intercepting calls on the proxied delegate |
interceptor |
System.Object Object on which the intercept method is called |
Proxied delegate
System.ArgumentNullException: Thrown if any argument is null
System.NotSupportedException: Thrown if delegate type has no 'Invoke' method
System.ArgumentException: Thrown if argument 'delegateType' is not a delegate
Frees managed resources.
Method called by delegate proxy, when the proxies delegate is called.
Name | Description |
---|---|
args |
System.Object[] Arguments passed to the proxied delegate by caller |
Return value provided by call interception handler
Gets the proxied delegate.
Factory component to create delegate proxy instances.
Creates a proxy for the specified delegate type.
Name | Description |
---|---|
delegateType |
System.Type Delegate type to be proxied |
callInterceptionHandler |
System.Func{System.Object[],System.Object} Function to be called when intercepting calls on the delegate |
Delegate proxy
Interface to be implemented by delegate proxies.
Gets the proxied delegate.
Interface to be implemented by delegate proxy factory components.
Creates a proxy for the specified delegate type.
Name | Description |
---|---|
delegateType |
System.Type Delegate type to be proxied |
callInterceptionHandler |
System.Func{System.Object[],System.Object} Function to be called when intercepting calls on the delegate |
Delegate proxy
Describes a remote delegate.
Creates a new instance of the RemoteDelegateInfo class.
Name | Description |
---|---|
handlerKey |
System.Guid Unique handler key of the client delegate |
delegateTypeName |
System.String Type name of the client delegate |
Gets the type name of the client delegate.
Gets the handler key of the client delegate.
Event aggregator to fire event if remote delegate is invoked.
To be called on server side to invoke a remote delegate, which will callback the correlating client delegate.
Name | Description |
---|---|
delegateType |
System.Type Delegate type |
handlerKey |
System.Guid Unique handle key of the client delegate |
remoteDelegateArguments |
System.Object[] Arguments of remote delegate invocation |
Return value provided by the client side callback
Event: Fired on client side, when a remote delegate is invoked.
Creates a new instance of the RemoteDelegateInvocationEventAggregator class.
Name | Description |
---|---|
delgateType |
Unknown type Delegate type |
uniqueCallKey |
Unknown type Unique key to correlate the RPC call |
handlerKey |
System.Guid Unique handler key to correlate the client delegate to be called, when remote delegate is invoked |
remoteDelegateArguments |
System.Object[] Arguments of remote delegate invocation |
Exception to be thrown, if remote method invocation has been failed.
Without this constructor, deserialization will fail.
Name | Description |
---|---|
info |
System.Runtime.Serialization.SerializationInfo Serialization info |
context |
System.Runtime.Serialization.StreamingContext Streaming context |
Creates a new instance of the RemoteInvocationException class.
Name | Description |
---|---|
message |
System.String Error message |
innerEx |
System.Exception Optional inner exception |
Provides remoting functionality on client side.
Creates a new instance of the RemotingClient class.
Name | Description |
---|---|
config |
CoreRemoting.ClientConfig Configuration settings |
Gets a list of active client instances.
Authenticates this CoreRemoting client instance with the specified credentials.
System.Security.SecurityException: Thrown, if authentication failed or timed out
Gets the local client delegate registry.
Gets the configuration settings used by the CoreRemoting client instance.
Connects this CoreRemoting client instance to the configured CoreRemoting server.
RemotingException: Thrown, if no channel is configured.
Channels.NetworkException: Thrown, if handshake with server failed.
Creates a proxy object to provide access to a remote service.
Name | Description |
---|---|
serviceInterfaceType |
System.Type Interface type of the remote service |
serviceName |
System.String Unique name of the remote service |
Proxy object
Creates a proxy object to provide access to a remote service.
- T - Type of the shared interface of the remote service
Name | Description |
---|---|
serviceName |
System.String Unique name of the remote service |
Proxy object
Gets or sets the default CoreRemoting client.
Disconnects from the server. The server is actively notified about disconnection.
Frees managed resources.
Gets a active client instance by its unqiue instance name.
Name | Description |
---|---|
uniqueClientInstanceName |
System.String Unique client instance name |
Active CoreRemoting client
Gets whether this CoreRemoting client instance has a session or not.
Gets the authenticated identity. May be null if authentication failed or if authentication is not configured.
Gets or sets the invocation timeout in milliseconds.
Calls a method on a remote service synchronously.
Name | Description |
---|---|
methodCallMessage |
CoreRemoting.RpcMessaging.MethodCallMessage Details of the remote method to be invoked |
oneWay |
System.Boolean Invoke method without waiting for or processing result. |
Results of the remote method invocation
Gets whether the connection to the server is established or not.
Event procedure: Called when the keep session alive timer elapses.
Name | Description |
---|---|
sender |
System.Object Event sender |
e |
System.Timers.ElapsedEventArgs Event arguments |
Gets or sets whether messages should be encrypted or not.
Gets a utility object to provide encryption of remoting messages.
Gets a utility object for building remoting messages.
Called when a message is received from server.
Name | Description |
---|---|
rawMessage |
System.Byte[] Raw message data |
Processes a authentication response message from server.
Name | Description |
---|---|
message |
CoreRemoting.RpcMessaging.WireMessage Deserialized WireMessage that contains a AuthenticationResponseMessage |
Processes a complete handshake message from server.
Name | Description |
---|---|
message |
CoreRemoting.RpcMessaging.WireMessage Deserialized WireMessage that contains a plain or encrypted Session ID |
Processes a remote delegate invocation message from server.
Name | Description |
---|---|
message |
CoreRemoting.RpcMessaging.WireMessage Deserialized WireMessage that contains a RemoteDelegateInvocationMessage |
Processes a RPC result message from server.
Name | Description |
---|---|
message |
CoreRemoting.RpcMessaging.WireMessage Deserialized WireMessage that contains a MethodCallResultMessage or a RemoteInvocationException |
System.Collections.Generic.KeyNotFoundException: Thrown, when the received result is of a unknown call
Gets the public key of this CoreRemoting client instance.
Gets the configured serializer.
Shuts a specified service proxy down and frees resources.
Name | Description |
---|---|
serviceProxy |
System.Object Proxy object that should be shut down |
Starts the keep session alive timer.
Exception to be thrown, if a remoting operation has been failed.
Without this constructor, deserialization will fail.
Name | Description |
---|---|
info |
System.Runtime.Serialization.SerializationInfo Serialization info |
context |
System.Runtime.Serialization.StreamingContext Streaming context |
Creates a new instance of the RemotingException class.
Name | Description |
---|---|
message |
System.String Error message |
innerEx |
System.Exception Optional inner exception |
CoreRemoting server implementation.
Creates a new instance of the RemotingServer class.
Name | Description |
---|---|
config |
CoreRemoting.ServerConfig Configuration settings to be used (Default configuration is used, if left null) |
Gets a list of active server instances.
Event: Fires after an RPC call is invoked.
Authenticates the specified credentials and returns whether the authentication was successful or not.
Name | Description |
---|---|
credentials |
CoreRemoting.Authentication.Credential[] Credentials to be used for authentication |
authenticatedIdentity |
CoreRemoting.Authentication.RemotingIdentity@ Authenticated identity (null when authentication fails) |
True when authentication was successful, otherwise false
Event: Fires before an RPC call is invoked.
Gets the channel used to do the raw network transport.
Gets the configuration settings.
Gets or sets the default CoreRemoting server.
Frees managed resources.
Event: Fires if an error occurs.
Gets a active server instance by its unqiue instance name.
Name | Description |
---|---|
uniqueServerInstanceName |
System.String Unique server instance name |
Active CoreRemoting server
Gets the component for encryption and decryption of messages.
Gets the component for easy building of method call messages.
Fires the OnAfterCall event.
Name | Description |
---|---|
serverRpcContext |
CoreRemoting.ServerRpcContext Server side RPC call context |
Fires the OnBeforeCall event.
Name | Description |
---|---|
serverRpcContext |
CoreRemoting.ServerRpcContext Server side RPC call context |
Fires the OnError event.
Name | Description |
---|---|
ex |
System.Exception Exception that describes the occurred error |
Gets the configured serializer.
Gets the dependency injection container that is used a service registry.
Gets the session repository to perform session management tasks.
Starts listening for client requests.
Stops listening for client requests and close all open client connections.
Gets the unique name of this server instance.
Implements a CoreRemoting session, which controls the CoreRemoting protocol on application layer at server side. This is doing the RPC magic of CoreRemoting at server side.
Creates a new instance of the RemotingSession class.
Name | Description |
---|---|
keySize |
System.Int32 Key size of the RSA keys for asymmetric encryption |
clientPublicKey |
System.Byte[] Public key of this session's client |
clientAddress |
string Client's network address |
server |
CoreRemoting.IRemotingServer Server instance, that hosts this session |
rawMessageTransport |
CoreRemoting.Channels.IRawMessageTransport Component, that does the raw message transport (send and receive) |
Event: Fired before the session is disposed to do some clean up.
Gets the timestamp when this session was created.
Gets the client's network address.
Frees managed resources.
Gets the authenticated identity of this session.
Gets whether authentication was successful.
Gets the server side RSA key pair of this session.
Gets the timestamp of the last activity of this session.
Maps delegate arguments into delegate proxies.
Name | Description |
---|---|
parameterValues |
System.Object[] Array of parameter values |
Array of parameter values where delegate values are mapped into delegate proxies
System.ArgumentNullException: Thrown if no session is provided
Gets whether message encryption is enabled for this session.
Gets component that does the raw message transport (send and receive).
Event procedure: Called if the ErrorOccured event is fired on the raw message transport component.
Name | Description |
---|---|
errorMessage |
System.String Error message |
ex |
System.Exception Optional exception from the transport infrastructure |
Event procedure: Called when the ReceiveMessage event is fired on the raw message transport component.
Name | Description |
---|---|
rawMessage |
System.Byte[] Raw message data that has been received |
Processes a wire message that contains a authentication request message, which is sent from a client to request authentication of a set of credentials.
Name | Description |
---|---|
request |
CoreRemoting.RpcMessaging.WireMessage Wire message from client |
Processes a wire message that contains a goodbye message, which is sent from a client to close the session.
Name | Description |
---|---|
request |
CoreRemoting.RpcMessaging.WireMessage Wire message from client |
Calls a method on a server side service.
Name | Description |
---|---|
request |
CoreRemoting.RpcMessaging.WireMessage RPC message from client |
Task which provides the serialized response message containing the method result asynchronously
System.MissingMethodException: Thrown if specified method in request doesn't exist
Gets the remote delegate invocation event aggregator.
Gets this session's unique session ID.
Describes a good bye message, which must be send from client to server in order to end a session.
Gets or sets the session ID of the session that should be ended.
Interface of message encryption manager component.
CreateWireMessage(messageType, serializedMessage, serializer, keyPair, sharedSecret, error, uniqueCallKey)
Creates a new wire message.
Name | Description |
---|---|
messageType |
System.String Message type name |
serializedMessage |
System.Byte[] Serialized message |
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer used to serialize the signed content |
keyPair |
CoreRemoting.Encryption.RsaKeyPair RSA key pair to be used for creating a RSA signature for the message data |
sharedSecret |
System.Byte[] Shared secret (wire message will be not encrypted, if null) |
error |
System.Boolean Species whether the wire message is in error state |
uniqueCallKey |
System.Byte[] Unique key to correlate RPC call |
The created wire message
System.ArgumentException: Thrown if the message type is left empty.
GetDecryptedMessageData(message, serializer, sharedSecret, sendersPublicKeyBlob, sendersPublicKeySize)
Gets decrypted data from a wire message.
Name | Description |
---|---|
message |
CoreRemoting.RpcMessaging.WireMessage Wire message |
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer used to deserialized the signed content |
sharedSecret |
System.Byte[] Shared secret (null, if the wire message is not encrypted) |
sendersPublicKeyBlob |
System.Byte[] Public key of the sender used for RSA signature verification |
sendersPublicKeySize |
System.Int32 Sender's public key size |
Decrypted raw data
Interface for message builder component.
Builds a new method call message.
Name | Description |
---|---|
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer adapter used to serialize argument values |
remoteServiceName |
System.String Unique name of the remote service that should be called |
targetMethod |
System.Reflection.MethodInfo Target method information |
args |
System.Object[] Array of arguments, which should passed a parameters |
The created method call message
Builds a new method call result message.
Name | Description |
---|---|
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer adapter used to serialize argument values |
uniqueCallKey |
System.Guid Unique key to correlate RPC call |
method |
System.Reflection.MethodInfo Method information of the called method |
args |
System.Object[] Arguments |
returnValue |
System.Object Returned return value |
Method call result message
Builds method call parameter messages from arguments for a specified target method.
Name | Description |
---|---|
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer adapter used to serialize argument values |
targetMethod |
System.Reflection.MethodInfo Target method information |
args |
System.Object[] Array of arguments, which should passed a parameters |
Enumerable of method call parameter messages
Provides tools for wire message creation an encryption.
CreateWireMessage(messageType, serializedMessage, serializer, keyPair, sharedSecret, error, uniqueCallKey)
Creates a new wire message.
Name | Description |
---|---|
messageType |
System.String Message type name |
serializedMessage |
System.Byte[] Serialized message |
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer used to serialize the signed content |
keyPair |
CoreRemoting.Encryption.RsaKeyPair RSA key pair to be used for creating a RSA signature for the message data |
sharedSecret |
System.Byte[] Shared secret (wire message will be not encrypted, if null) |
error |
System.Boolean Species whether the wire message is in error state |
uniqueCallKey |
System.Byte[] Unique key to correlate RPC call |
The created wire message
System.ArgumentException: Thrown if the message type is left empty.
GetDecryptedMessageData(message, serializer, sharedSecret, sendersPublicKeyBlob, sendersPublicKeySize)
Gets decrypted data from a wire message.
Name | Description |
---|---|
message |
CoreRemoting.RpcMessaging.WireMessage Wire message |
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer used to deserialized the signed content |
sharedSecret |
System.Byte[] Shared secret (null, if the wire message is not encrypted) |
sendersPublicKeyBlob |
System.Byte[] Public key of the sender used for RSA signature verification |
sendersPublicKeySize |
System.Int32 Sender's public key size |
Decrypted raw data
Extension methods for messaging.
Parses a text message that contains name value pairs.
Name | Description |
---|---|
message |
System.String Text message |
entrySeperator |
System.Char Char used to separate entries |
pairSeperator |
System.Char Char used to separate pairs |
Dictionary with parsed name value pairs
Unwraps parameter values and parameter types from a deserialized MethodCallMessage.
Name | Description |
---|---|
callMessage |
CoreRemoting.RpcMessaging.MethodCallMessage MethodCallMessage object |
parameterValues |
System.Object[]@ Out: Unwrapped parameter values |
parameterTypes |
System.Type[]@ Out: Unwrapped parameter types |
Describes a method call as serializable message.
Gets or sets an array of call context entries that should be send to the server.
Gets or sets the name of the remote method that should be called.
Gets or sets an array of messages that describes the parameters that should be passed to the remote method.
Gets or sets the name of the remote service that should be called.
Method call message builder component.
Builds a new method call message.
Name | Description |
---|---|
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer adapter used to serialize argument values |
remoteServiceName |
System.String Unique name of the remote service that should be called |
targetMethod |
System.Reflection.MethodInfo Target method information |
args |
System.Object[] Array of arguments, which should passed a parameters |
The created method call message
Builds a new method call result message.
Name | Description |
---|---|
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer adapter used to serialize argument values |
uniqueCallKey |
System.Guid Unique key to correlate RPC call |
method |
System.Reflection.MethodInfo Method information of the called method |
args |
System.Object[] Arguments |
returnValue |
System.Object Returned return value |
Method call result message
Builds method call parameter messages from arguments for a specified target method.
Name | Description |
---|---|
serializer |
CoreRemoting.Serialization.ISerializerAdapter Serializer adapter used to serialize argument values |
targetMethod |
System.Reflection.MethodInfo Target method information |
args |
System.Object[] Array of arguments, which should passed a parameters |
Enumerable of method call parameter messages
Serializable message that describes an out parameter.
Gets or sets whether the out value is null.
Gets or sets the out value of the parameter.
Gets or sets the name of the parameter.
Serializable message that describes a parameter of an remote method call.
Gets or sets whether the parameter is an out parameter or not.
Gets or sets whether the parameter is null or not.
Gets or sets the name of the parameter.
Gets or sets the type name of the parameter.
Gets or sets the parameter value.
Serializable message that describes the result of a remote method call.
Gets or sets a snapshot of the call context that flows from server back to the client.
Gets or sets whether the return value is null or not.
Gets or sets an array of out parameters.
Gets or sets the return value of the invoked method.
Serializable message that describes the invocation of a remote delegate.
Gets or sets an array of arguments that should be passed as parameters to the remote delegate.
Gets or sets a unique handler key to identify the remote delegate.
Gets or sets an unique key to correlate RPC calls.
Serializable message to transport RPC invocation details and their results over the wire.
Gets or sets the raw data of the message content and its RSA signatures (only if message encryption is enabled).
Gets or sets whether this message contains error data.
Gets or sets the initialization vector as byte array (only needed if message encryption is enabled).
Gets or sets the type of the message.
Gets or sets an unique key to correlate RPC calls.
Extension methods for binary serialization.
Deserializes raw data back into an object.
Name | Description |
---|---|
formatter |
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter Binary formatter instance |
rawData |
System.Byte[] Raw data that should be deserialized |
Deserialized object
Makes the System.Runtime.Serialization.Formatters.Binary.BinaryFormatter safe.
Name | Description |
---|---|
formatter |
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter The System.Runtime.Serialization.Formatters.Binary.BinaryFormatter to guard. |
The safe version of the System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.
Serializes the specified object into a byte array.
Name | Description |
---|---|
formatter |
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter Binary formatter instance |
objectToSerialize |
System.Object Object to serialize |
Serialized data
Serializer adapter to allow binary serialization.
Creates a new instance of the BinarySerializerAdapter class.
Name | Description |
---|---|
config |
CoreRemoting.Serialization.Binary.BinarySerializerConfig Configuration settings |
Deserializes raw data back into an object graph.
Name | Description |
---|---|
type |
System.Type Object type |
rawData |
System.Byte[] Raw data that should be deserialized |
Deserialized object graph
Deserializes raw data back into an object graph.
Name | Description |
---|---|
rawData |
System.Byte[] Raw data that should be deserialized |
- T - Object type
Deserialized object graph
Gets whether parameter values must be put in an envelope object for proper deserialization, or not.
Gets a formatter instance. The instance is reused for further calls.
Binary formatter instance
Serializes an object graph.
Name | Description |
---|---|
type |
System.Type Object type |
graph |
System.Object Object graph to be serialized |
Serialized data
Serializes an object graph.
Name | Description |
---|---|
graph |
``0 Object graph to be serialized |
- T - Object type
Serialized data
Describes binary serialization settings.
Creates a new instance of the BinarySerializerConfig class.
Gets or sets the type filter level for security reasons.
Gets or sets whether assembly versions should be serialized or not.
Gets or sets the style how types should be formatted.
Custom replacement for the DelegateSerializationHolder featuring delegate validation.
Initializes a new instance of the CustomDelegateSerializationHolder class.
Name | Description |
---|---|
info |
System.Runtime.Serialization.SerializationInfo Serialization info. |
context |
System.Runtime.Serialization.StreamingContext Streaming context |
GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
Deserialization surrogate for the DataSet class.
GetObjectData(System.Object,System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
SetObjectData(System.Object,System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext,System.Runtime.Serialization.ISurrogateSelector)
Blacklist-based delegate validator.
Initializes a new instance of the DelegateValidator class.
Name | Description |
---|---|
blacklistedNamespaces |
System.String[] Namespace blacklist. |
Gets or sets the default IDelegateValidator instance.
The default blacklist of the namespaces.
Validates the given delegates. Throws exceptions for methods defined in the blacklisted namespaces.
Name | Description |
---|---|
del |
System.Delegate The delegate to validate. |
Interface for validating the deserialized delegates.
Validates the given delegate. Throws exceptions for the unsafe delegates found in the invocation list.
Name | Description |
---|---|
del |
System.Delegate The delegate to validate. |
Interface for validating type names before loading types for deserialization.
Validates the given type name before loading. Throws exceptions for the types not safe for deserialization.
Name | Description |
---|---|
assemblyName |
System.String The name of the assembly. |
typeName |
System.String The name of the type. |
Initializes a new instance of the SafeSerializationBinder class.
Name | Description |
---|---|
nextBinder |
System.Runtime.Serialization.SerializationBinder Next serialization binder in chain. |
Core library assembly name.
System.DelegateSerializationHolder type name.
Safe surrogate selector provides surrogates for DataSet and WindowsIdentity classes.
Initializes a new instance of the SafeSurrogateSelector class.
Name | Description |
---|---|
nextSelector |
System.Runtime.Serialization.ISurrogateSelector Next System.Runtime.Serialization.ISurrogateSelector, optional. |
GetSurrogate(System.Type,System.Runtime.Serialization.StreamingContext,System.Runtime.Serialization.ISurrogateSelector@)
Represents the name of a .NET type.
AssemblyName doesn't contain Version part.
Gets or sets the name of the assembly.
Parses the given type name and returns the TypeFullName instance.
Name | Description |
---|---|
typeName |
System.String Assembly-qualified type name. |
A parsed TypeFullName instance.
Gets or sets the name of the type.
Validates the type names before loading them for deserialization.
Initializes a new instance of the TypeNameValidator class.
Name | Description |
---|---|
blacklistedTypes |
System.String[] The list of the blacklisted types. |
Gets or sets the default ITypeNameValidator instance.
The default blacklist of the types.
Exception to be thrown when possible deserialization vulnerability is detected.
Initializes a new instance of the UnsafeDeserializationException class.
Constructor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
Initializes a new instance of the UnsafeDeserializationException class.
Name | Description |
---|---|
message |
System.String Exception message. |
GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
Deserialization surrogate for the WindowsIdentity class.
GetObjectData(System.Object,System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
SetObjectData(System.Object,System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext,System.Runtime.Serialization.ISurrogateSelector)
Serializer adapter to allow BSON serialization.
Creates a new instance of the BsonSerializerAdapter class.
Name | Description |
---|---|
config |
CoreRemoting.Serialization.Bson.BsonSerializerConfig Optional configuration settings |
Deserializes raw data back into an object graph.
Name | Description |
---|---|
type |
System.Type Object type |
rawData |
System.Byte[] Raw data that should be deserialized |
Deserialized object graph
Deserializes raw data back into an object graph.
Name | Description |
---|---|
rawData |
System.Byte[] Raw data that should be deserialized |
- T - Object type
Deserialized object graph
Gets whether parameter values must be put in an envelope object for proper deserialization, or not.
Serializes an object graph.
Name | Description |
---|---|
type |
System.Type Object type |
graph |
System.Object Object graph to be serialized |
Serialized data
Serializes an object graph.
Name | Description |
---|---|
graph |
``0 Object graph to be serialized |
- T - Object type
Serialized data
Describes BSON serializer settings.
Creates a new instance of the BsonSerializerConfig class.
Name | Description |
---|---|
jsonConverters |
System.Collections.Generic.IEnumerable{Newtonsoft.Json.JsonConverter} Optional list of JSON converters |
Gets a list of JSON converters to customize BSON serialization.
Wraps values and preserve their types for serialization.
Creates a new instance of the Envelope class.
Creates a new instance of the Envelope class.
Name | Description |
---|---|
value |
System.Object Value to wrap |
Gets the type of the wrapped value.
Gets the wrapped value.
Interface that serializer adapter components must implement.
Deserializes raw data back into an object graph.
Name | Description |
---|---|
type |
System.Type Object type |
rawData |
System.Byte[] Raw data that should be deserialized |
Deserialized object graph
Deserializes raw data back into an object graph.
Name | Description |
---|---|
rawData |
System.Byte[] Raw data that should be deserialized |
- T - Object type
Deserialized object graph
Gets whether parameter values must be put in an envelope object for proper deserialization, or not.
Serializes an object graph.
Name | Description |
---|---|
type |
System.Type Object type |
graph |
System.Object Object graph to be serialized |
Serialized data
Serializes an object graph.
Name | Description |
---|---|
graph |
``0 Object graph to be serialized |
- T - Object type
Serialized data
Describes the configuration settings of a CoreRemoting service instance.
Creates new new instance of the ServerConfig class.
Gets or sets the authentication provider that should be used to handle authentication requests.
Gets or sets whether authentication is required in order to establish a new session.
Gets or sets the server channel to be used for transport of messages over the wire (WebsocketServerChannel is used, if set to null).
Gets or sets the dependency injection container to be used for service registration. Castle Windsor Container is used, if set to null.
Gets or sets the host name.
Gets or sets the sweep interval for inactive sessions in seconds (No session sweeping if set to 0).
Gets or set whether this is the default server.
Gets or sets the key size for asymmetric encryption (only relevant, if message encryption is enabled).
Gets or sets the maximum session inactivity time in minutes.
Gets or sets whether messages should be encrypted or not.
Gets or sets the network port on which the server should be listening for requests.
Gets or sets an optional action which should be called on server startup to register services.
Gets or sets the serializer to be used (BSON serializer is used, if set to null).
Gets or sets the session repository to be used to manage sessions.
Gets or sets the unique name of this server instance.
Describes the server side context of a RPC call.
Gets or sets the last exception that is occurred.
Gets the message that describes the remote method call.
Gets or sets the message that contains the results of a remote method call.
Gets or sets the instance of the service, on which the method is called.
Gets or sets the CoreRemoting session that is used to handle the RPC.
Gets or sets the unique key of RPC call.
Implements a proxy of a remote service that is hosted on a CoreRemoting server.. This is doing the RPC magic of CoreRemoting at client side.
- TServiceInterface - Type of the remote service's interface (also known as contract of the service)
Creates a new instance of the ServiceProxy class.
Name | Description |
---|---|
client |
CoreRemoting.RemotingClient CoreRemoting client to be used for client/server communication |
serviceName |
System.String Unique name of the remote service |
Intercepts a call of a member on the proxy object.
Name | Description |
---|---|
invocation |
Castle.DynamicProxy.IInvocation Intercepted invocation details |
RemotingException: Thrown if a remoting operation has been failed
System.NotSupportedException: Thrown if a member of a type marked as OneWay is intercepted, that has another return type than void
RemoteInvocationException: Thrown if an exception occurred when the remote method was invoked
Shutdown service proxy and free resources.
Finalizer.
Gets or sets the interface type of the proxied remote service.
Maps delegate arguments into serializable RemoteDelegateInfo objects.
Name | Description |
---|---|
invocation |
Castle.DynamicProxy.IInvocation Invocation details |
Array of arguments (includes mapped ones)
System.NotSupportedException:
Default in-memory session repository.
Creates a new instance of the SessionRepository class.
Name | Description |
---|---|
keySize |
System.Int32 Key size for asymmetric encryption. Should be 3072 or better in 2021 (Please use steps of 1024). |
inactiveSessionSweepInterval |
System.Int32 Sweep interval for inactive sessions in seconds (No session sweeping, if set to 0) |
maximumSessionInactivityTime |
System.Int32 Maximum session inactivity time in minutes |
Creates a new session.
Name | Description |
---|---|
clientPublicKey |
System.Byte[] Client's public key |
server |
CoreRemoting.IRemotingServer Server instance |
rawMessageTransport |
CoreRemoting.Channels.IRawMessageTransport Component that does the raw message transport |
The newly created session
Frees managed resources.
Gets a specified session by its ID.
Name | Description |
---|---|
sessionId |
System.Guid Session ID |
The session correlating to the specified session ID
System.Collections.Generic.KeyNotFoundException: Thrown, if no session with the specified session ID is found
Event procedure: Called when the inactive session sweep timer elapses.
Name | Description |
---|---|
sender |
System.Object Event sender |
e |
System.Timers.ElapsedEventArgs Event arguments |
Gets the key size for asymmetric encryption. Should be 3072 or better in 2021 ;)
Removes a specified session by its ID.
Name | Description |
---|---|
sessionId |
System.Guid Session ID |
Gets a list of all sessions.
Starts the inactive session sweep timer.
Name | Description |
---|---|
inactiveSessionSweepInterval |
System.Int32 Sweep interval for inactive sessions in seconds |