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
Assembly: Eco.Gameplay.dll
Syntax
public class ChannelManager : Singleton<ChannelManager>, IRegistrarManager<Channel, SpecialChannel>, IRegistrarManager, IController, IViewController, IHasUniversalID
Constructors
ChannelManager()
Declaration
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
Registrar
Declaration
public Registrar<Channel> Registrar { get; }
Property Value
SpecialEntries
Declaration
public Channel[] SpecialEntries { get; set; }
Property Value
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
Get(SpecialChannel)
Retrieves a special channel given it's type.
Declaration
public Channel Get(SpecialChannel specialType)
Parameters
Returns
Initialize()
Declaration
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
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
Extension Methods