Show / Hide Table of Contents

Class VISABApi

Class for initializing transmission sessions and making requests independant of sessions to the VISAB WebApi.

Inheritance
Object
VISABApi
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: VISABConnector
Assembly: VISABConnector.dll
Syntax
public class VISABApi

Constructors

| Improve this Doc View Source

VISABApi(String, Int32, Int32)

Declaration
public VISABApi(string hostAdress = "http://localhost", int port = 2673, int requestTimeout = 5)
Parameters
Type Name Description
String hostAdress

The hostadress of the VISAB WebAPi

Int32 port

The port of the VISAB WebApi

Int32 requestTimeout

The time in seconds before a request is timeouted

Properties

| Improve this Doc View Source

BaseAdress

The full base adress of the VISAB WebApi.

Declaration
public string BaseAdress { get; }
Property Value
Type Description
String
| Improve this Doc View Source

ConnectorVersion

The current assembly version of the VISABConnector dll.

Declaration
public static Version ConnectorVersion { get; }
Property Value
Type Description
Version
| Improve this Doc View Source

HostAdress

The host adress on which the VISAB WebApi is running.

Declaration
public string HostAdress { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Port

The port on which the VISAB WebApi is running.

Declaration
public int Port { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

RequestTimeout

The time in seconds until a request is timeouted.

Declaration
public int RequestTimeout { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

SessionIndependantRequestHandler

Request handler used for making Http requests that are independant of sessions.

Declaration
public IVISABRequestHandler SessionIndependantRequestHandler { get; }
Property Value
Type Description
IVISABRequestHandler

Methods

| Improve this Doc View Source

GameIsSupportedAsync(String)

Checks if the VISAB WebApi can receive data for the given game.

Declaration
public async Task<ApiResponse<bool>> GameIsSupportedAsync(string game)
Parameters
Type Name Description
String game

The game to check

Returns
Type Description
Task<ApiResponse<Boolean>>

An ApiResponse object with Content set to true if game is supported

| Improve this Doc View Source

GetActiveSessionsAsync()

Returns a list of all the sessionIds for all active sessions.

Declaration
public async Task<ApiResponse<IList<Guid>>> GetActiveSessionsAsync()
Returns
Type Description
Task<ApiResponse<IList<Guid>>>

An ApiResponse object whose content contains a list of the sessionIds for all active sessions if successful

| Improve this Doc View Source

GetSessionStatus(Guid)

Gets the session status of for a given sessionId.

Declaration
public async Task<ApiResponse<SessionStatus>> GetSessionStatus(Guid sessionId)
Parameters
Type Name Description
Guid sessionId

The sessionId to get the status for

Returns
Type Description
Task<ApiResponse<SessionStatus>>

An ApiResponse object containing a SessionStatus object as Content if succesful

| Improve this Doc View Source

InitiateSessionAsync(IMetaInformation)

Creates a IVISABSession object by opening a transmission session at the VISAB WebApi.

Declaration
public async Task<ApiResponse<IVISABSession>> InitiateSessionAsync(IMetaInformation metaInformation)
Parameters
Type Name Description
IMetaInformation metaInformation

The meta information for the session to open

Returns
Type Description
Task<ApiResponse<IVISABSession>>

An ApiResponse object containing a IVISABSession if session was created

| Improve this Doc View Source

PingApiAsync()

Indicates if the VISAB WebApi is running. If the request was successful, it is running.

Declaration
public async Task<ApiResponse<string>> PingApiAsync()
Returns
Type Description
Task<ApiResponse<String>>

An ApiResponse object whose content contains the response message if request was successful

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX