Show / Hide Table of Contents

Class ChannelManager

Handles all global concerns of Channels: creation, editing, removal. Also initializes special/system channels. Is synced to each individual client via Channels.

Inheritance
System.Object
ChannelManager
Implements
IRegistrarManager<Channel, SpecialChannel>
IRegistrarManager
IController
IViewController
IHasUniversalID
Namespace: Eco.Gameplay.Systems.Messaging.Chat.Channels
Assembly: Eco.Gameplay.dll
Syntax
public class ChannelManager : Singleton<ChannelManager>, IRegistrarManager<Channel, SpecialChannel>, IRegistrarManager, IController, IViewController, IHasUniversalID

Constructors

ChannelManager()

Declaration
public ChannelManager()

Properties

Channels

Declaration
public static IEnumerable<Channel> Channels { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<Channel>

ControllerID

Declaration
public ref int ControllerID { get; }
Property Value
Type Description
System.Int32

OnChanged

Declaration
public ThreadSafeAction OnChanged { get; }
Property Value
Type Description
ThreadSafeAction

Registrar

Declaration
public Registrar<Channel> Registrar { get; }
Property Value
Type Description
Registrar<Channel>

SpecialEntries

Declaration
public Channel[] SpecialEntries { get; set; }
Property Value
Type Description
Channel[]

Methods

CommonChannels(User)

Declaration
public IEnumerable<Channel> CommonChannels(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Collections.Generic.IEnumerable<Channel>

CreateChannel(Player)

Opens editor UI with a default (public) channel draft, that will be active and usable only after saving.

Declaration
public void CreateChannel(Player player)
Parameters
Type Name Description
Player player

EditChannel(Player, Channel)

Opens editor UI for the given channel.

Declaration
public void EditChannel(Player player, Channel channel)
Parameters
Type Name Description
Player player
Channel channel

Get(SpecialChannel)

Retrieves a special channel given it's type.

Declaration
public Channel Get(SpecialChannel specialType)
Parameters
Type Name Description
SpecialChannel specialType
Returns
Type Description
Channel

Initialize()

Declaration
public void Initialize()

InitSpecialEntry(Channel)

Declaration
public void InitSpecialEntry(Channel channel)
Parameters
Type Name Description
Channel channel

ManagedChannels(User)

Declaration
public IEnumerable<Channel> ManagedChannels(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Collections.Generic.IEnumerable<Channel>

RemoveChannel(User, Channel)

When player requests to remove channel (will check permissions and popup confirm dialog)

Declaration
public Task<bool> RemoveChannel(User user, Channel channel)
Parameters
Type Name Description
User user
Channel channel
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

RemoveChannel(Channel)

Remove channel and all associated chat messages

Declaration
public void RemoveChannel(Channel channel)
Parameters
Type Name Description
Channel channel

UsableChannels(User)

Declaration
public IEnumerable<Channel> UsableChannels(User user)
Parameters
Type Name Description
User user
Returns
Type Description
System.Collections.Generic.IEnumerable<Channel>

Implements

IRegistrarManager<TType, TSpecialType>
IRegistrarManager
IController
IViewController
IHasUniversalID

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾