Table of Contents

Class DummyGatewayService

Namespace
Geotab.Checkmate.ObjectModel.Registration.Gateway
Assembly
Geotab.Checkmate.ObjectModel.dll

Dummy service for dependent modules. Used as an indirect injection into the Device Bridge for existing unit tests. Basic singleton pattern.

public class DummyGatewayService : IGatewayService
Inheritance
DummyGatewayService
Implements
Inherited Members

Fields

Value

The singleton. DummyGatewayService

public static readonly DummyGatewayService Value

Field Value

DummyGatewayService

Properties

ResilientGatewayInvokerByJurisdiction

Gets the collection of resilient Gateway invokers by jurisdiction.

public IDictionary<Jurisdiction, IResilientGatewayInvoker> ResilientGatewayInvokerByJurisdiction { get; }

Property Value

IDictionary<Jurisdiction, IResilientGatewayInvoker>

IDictionary<TKey, TValue> The resilient Gateway invokers by jurisdiction.

ResilientJurisdictionlessGatewayInvoker

Gets the resilient jurisdictionless Gateway invoker. Used to notify master gateway of server/database jurisdiction.

public IResilientGatewayInvoker? ResilientJurisdictionlessGatewayInvoker { get; set; }

Property Value

IResilientGatewayInvoker

IResilientGatewayInvoker The resilient Gateway invoker.

Source

Gets the source name of the service.

public string Source { get; }

Property Value

string

string The source.

Methods

NotifyJurisdictionChangedAsync(Jurisdiction?, Guid?, CancellationToken)

Primary method to notify the Gateway that the MyGeotab jurisdiction has changed.

public Task<NotifyJurisdictionChangedResult> NotifyJurisdictionChangedAsync(Jurisdiction? jurisdiction, Guid? clientGuid, CancellationToken cancellationToken = default)

Parameters

jurisdiction Jurisdiction?

The jurisdiction.

clientGuid Guid?

The company ID.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<NotifyJurisdictionChangedResult>

An object representing the notification result.

RegisterClientAsync(Guid?, string?, Jurisdiction?, CancellationToken)

New Gateway client registration call. This will replace current SetorAddClientJurisdiction call.

public Task<RegisterClientResult> RegisterClientAsync(Guid? clientGuid, string? databaseName, Jurisdiction? jurisdiction, CancellationToken cancellationToken = default)

Parameters

clientGuid Guid?

The company ID.

databaseName string

The database name.

jurisdiction Jurisdiction?

The jurisdiction.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<RegisterClientResult>

An awaitable task indicating the result of type RegisterClientResult.

RegisterDeviceAsync(Jurisdiction?, int?, Guid?, string, CancellationToken)

Primary method to register a device via the Gateway.

public Task<RegisterDeviceResult> RegisterDeviceAsync(Jurisdiction? jurisdiction, int? hardwareId, Guid? clientGuid, string reason, CancellationToken cancellationToken = default)

Parameters

jurisdiction Jurisdiction?

The jurisdiction.

hardwareId int?

The hardware ID.

clientGuid Guid?

The company ID.

reason string

The reason the device is being registered.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<RegisterDeviceResult>

An object representing the registration result.

SendDeviceRegistrationChecksumAsync(Jurisdiction?, Guid?, string?, CancellationToken)

Primary method to send the device registration states checksum.

public Task<DeviceRegistrationChecksumResult> SendDeviceRegistrationChecksumAsync(Jurisdiction? jurisdiction, Guid? clientGuid, string? checksum, CancellationToken cancellationToken = default)

Parameters

jurisdiction Jurisdiction?

The jurisdiction.

clientGuid Guid?

The company ID.

checksum string

The checksum.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<DeviceRegistrationChecksumResult>

An awaitable task.

SetOrAddClientJurisdictionAsync(Jurisdiction?, Guid?, CancellationToken)

Primary method to notify the Gateway of the MyGeotab client jurisdiction. This is called upon Database initialization.

public Task<SetOrAddClientJurisdictionResult> SetOrAddClientJurisdictionAsync(Jurisdiction? jurisdiction, Guid? clientGuid, CancellationToken cancellationToken = default)

Parameters

jurisdiction Jurisdiction?

The jurisdiction.

clientGuid Guid?

The company ID.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<SetOrAddClientJurisdictionResult>

An awaitable task indicating the result of type SetOrAddClientJurisdictionResult.

UnregisterClientAsync(Guid?, string, CancellationToken)

Primary method to unregister a client via the Gateway.

public Task UnregisterClientAsync(Guid? clientGuid, string reason, CancellationToken cancellationToken = default)

Parameters

clientGuid Guid?

The company ID.

reason string

The reason the client is being unregistered.

cancellationToken CancellationToken

The cancellation token.

Returns

Task

A Task<TResult> representing the result of the asynchronous operation.

UnregisterDeviceAsync(int?, Guid?, string, CancellationToken)

Primary method to unregister a device via the Gateway.

public Task<UnregisterDeviceResult> UnregisterDeviceAsync(int? hardwareId, Guid? clientGuid, string reason, CancellationToken cancellationToken = default)

Parameters

hardwareId int?

The hardware ID.

clientGuid Guid?

The company ID.

reason string

The reason the device is being unregistered.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<UnregisterDeviceResult>

An object representing the unregistration result.