Show / Hide Table of Contents

Class RoundBasedSession

A wrapper class for communicating with the VISAB WebApi in round based games.

Inheritance
Object
RoundBasedSession
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 static class RoundBasedSession

Properties

| Improve this Doc View Source

Session

The underylying session that is used.

Declaration
public static IVISABSession Session { get; }
Property Value
Type Description
IVISABSession

Methods

| Improve this Doc View Source

CloseSessionAsync()

Closes the active session.

Declaration
public static async Task<bool> CloseSessionAsync()
Returns
Type Description
Task<Boolean>

True if session was closed

| Improve this Doc View Source

GetFileAsync()

Receives the written json file for the session.

Declaration
public static async Task<string> GetFileAsync()
Returns
Type Description
Task<String>

The written json file if successfully retrieved, empty string else

| Improve this Doc View Source

SendImagesAsync(IImageContainer)

Sends images using the current session.

Declaration
public static async Task<bool> SendImagesAsync(IImageContainer image)
Parameters
Type Name Description
IImageContainer image

The image to send

Returns
Type Description
Task<Boolean>

True if successfully sent

| Improve this Doc View Source

SendStatisticsAsync(IStatistics)

Sends statistics using the current session.

Declaration
public static async Task<bool> SendStatisticsAsync(IStatistics statistics)
Parameters
Type Name Description
IStatistics statistics

The statistics to send

Returns
Type Description
Task<Boolean>

True if successfully sent

| Improve this Doc View Source

StartSessionAsync(String, String, Int32, Int32)

Starts a VISAB WebApi session.

Declaration
public static async Task<bool> StartSessionAsync(string game, string hostAdress = "http://localhost", int port = 2673, int requestTimeout = 5)
Parameters
Type Name Description
String game

The game for which to start the session

String hostAdress

The hostAdress of the VISAB WebApi

Int32 port

The port of the VISAB WebApi

Int32 requestTimeout

The request timeout to use

Returns
Type Description
Task<Boolean>

True if session was started

| Improve this Doc View Source

StartSessionAsync(IMetaInformation, String, Int32, Int32)

Starts a VISAB WebApi session.

Declaration
public static async Task<bool> StartSessionAsync(IMetaInformation metaInformation, string hostAdress = "http://localhost", int port = 2673, int requestTimeout = 5)
Parameters
Type Name Description
IMetaInformation metaInformation

The metainformation with which to initialize the session

String hostAdress

The hostAdress of the VISAB WebApi

Int32 port

The port of the VISAB WebApi

Int32 requestTimeout

The request timeout to use

Returns
Type Description
Task<Boolean>

True if session was started

Events

| Improve this Doc View Source

MessageAddedEvent

Event that will be invoked when a log message should be written. The argument contains the message.

Declaration
public static event Action<string> MessageAddedEvent
Event Type
Type Description
Action<String>
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX