Show / Hide Table of Contents

Class ClusterModeratorConnector

The Cluster Moderator Connector allows GUI or Command Line Moderator User Applications to connect with cluster.

Inheritance
System.Object
ClusterModeratorConnector
Implements
IModeratorPanel
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: peno_cluster_moderator
Assembly: peno_cluster_moderator.dll
Syntax
public class ClusterModeratorConnector : IModeratorPanel

Constructors

| Improve this Doc View Source

ClusterModeratorConnector(String, String)

Create a new Cluster Moderator Connector instance using the username and password of some user.

Declaration
public ClusterModeratorConnector(string username, string password)
Parameters
Type Name Description
System.String username

The username of the user.

System.String password

The password of the user.

Exceptions
Type Condition
System.ArgumentException

Thrown when the username of password were incorrect or the connection to cluster failed.

Methods

| Improve this Doc View Source

AddWord(String)

Add a word to the blacklist. If the word is null or empty, nothing will happen.

Declaration
public void AddWord(string word)
Parameters
Type Name Description
System.String word

The word to add to the blacklist, this word may contain spaces.

| Improve this Doc View Source

BlockUser(String, DateTime)

Block a user. If one of the params is null or empty, nothing happens.

Declaration
public void BlockUser(string userId, DateTime date)
Parameters
Type Name Description
System.String userId

The user to block.

System.DateTime date

The time at which the user was blocked.

| Improve this Doc View Source

GetBlackList()

Get all the words in the blacklist.

Declaration
public List<string> GetBlackList()
Returns
Type Description
System.Collections.Generic.List<System.String>

A list of words in the blacklist. These words may contain spaces.

| Improve this Doc View Source

GetBlockedUsers()

Get all the blocked users.

Declaration
public List<(string, DateTime)> GetBlockedUsers()
Returns
Type Description
System.Collections.Generic.List<System.ValueTuple<System.String, System.DateTime>>

A list of blocked users.

| Improve this Doc View Source

GetReportedQA()

Get the reported Q&A from Cluster.

Declaration
public List<(string, string, string)> GetReportedQA()
Returns
Type Description
System.Collections.Generic.List<System.ValueTuple<System.String, System.String, System.String>>

The reported Q&A from Cluster.

Exceptions
Type Condition
System.ApplicationException

There was an error while fetching the reported Q&A.

| Improve this Doc View Source

OffensiveReportedQA((String, String, String))

Classify the given Q&A tuple as offensive.

Declaration
public void OffensiveReportedQA((string, string, string) reportedQA)
Parameters
Type Name Description
System.ValueTuple<System.String, System.String, System.String> reportedQA

A 3-tuple consisting of the user id, the question, and the answer.

| Improve this Doc View Source

RemoveWord(String)

Remove a word from the blacklist. If the word is null or empty, nothing will happen.

Declaration
public void RemoveWord(string word)
Parameters
Type Name Description
System.String word

The word to remove from the blacklist, this word may contain spaces.

| Improve this Doc View Source

SafeReportedQA((String, String, String))

Classify the given Q&A tuple as safe.

Declaration
public void SafeReportedQA((string, string, string) reportedQA)
Parameters
Type Name Description
System.ValueTuple<System.String, System.String, System.String> reportedQA

A 3-tuple consisting of the user id, the question, and the answer.

| Improve this Doc View Source

UnblockUser(String)

Unblock a user. If one of the params is null or empty, nothing happens.

Declaration
public void UnblockUser(string userId)
Parameters
Type Name Description
System.String userId

The user to unblock.

Implements

IModeratorPanel
  • Improve this Doc
  • View Source
Back to top Generated by DocFX