C# Класс ExamplesChat.Android.ChatAppBase

In an attempt to keep things as clear as possible all shared implementation across chat examples has been provided in this base class.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
lastPeerMessageDict ChatMessage>.Dictionary

Открытые методы

Метод Описание
AppendLineToChatHistory ( string message ) : void

Append the provided message to the chat history text box.

ChatAppBase ( string name, ConnectionType connectionType ) : System

Constructor for ChatAppBase

ClearChatHistory ( ) : void

Clears the chat history

ClearInputLine ( ) : void

Clears the input text box

PrintUsageInstructions ( ) : void

Outputs the usage instructions to the chat window

RefreshNetworkCommsConfiguration ( ) : void

Updates the configuration of this instance depending on set fields

SendMessage ( string stringToSend ) : void

Send a message.

ShowMessage ( string message ) : void

Show a message box as an alternative to writing to the chat history

Защищенные методы

Метод Описание
HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void

Performs whatever functions we might so desire when we receive an incoming ChatMessage

Приватные методы

Метод Описание
HandleConnectionClosed ( Connection connection ) : void

Performs whatever functions we might so desire when an existing connection is closed.

Описание методов

AppendLineToChatHistory() публичный абстрактный Метод

Append the provided message to the chat history text box.
public abstract AppendLineToChatHistory ( string message ) : void
message string Message to be appended
Результат void

ChatAppBase() публичный Метод

Constructor for ChatAppBase
public ChatAppBase ( string name, ConnectionType connectionType ) : System
name string
connectionType ConnectionType
Результат System

ClearChatHistory() публичный абстрактный Метод

Clears the chat history
public abstract ClearChatHistory ( ) : void
Результат void

ClearInputLine() публичный абстрактный Метод

Clears the input text box
public abstract ClearInputLine ( ) : void
Результат void

HandleIncomingChatMessage() защищенный Метод

Performs whatever functions we might so desire when we receive an incoming ChatMessage
protected HandleIncomingChatMessage ( PacketHeader header, Connection connection, ChatMessage incomingMessage ) : void
header NetworkCommsDotNet.PacketHeader The PacketHeader corresponding with the received object
connection Connection The Connection from which this object was received
incomingMessage ChatMessage The incoming ChatMessage we are after
Результат void

PrintUsageInstructions() публичный Метод

Outputs the usage instructions to the chat window
public PrintUsageInstructions ( ) : void
Результат void

RefreshNetworkCommsConfiguration() публичный Метод

Updates the configuration of this instance depending on set fields
public RefreshNetworkCommsConfiguration ( ) : void
Результат void

SendMessage() публичный Метод

Send a message.
public SendMessage ( string stringToSend ) : void
stringToSend string
Результат void

ShowMessage() публичный абстрактный Метод

Show a message box as an alternative to writing to the chat history
public abstract ShowMessage ( string message ) : void
message string Message to be output
Результат void

Описание свойств

lastPeerMessageDict защищенное свойство

Dictionary to keep track of which peer messages have already been written to the chat window
protected Dictionary lastPeerMessageDict
Результат ChatMessage>.Dictionary