ChatClient/ChatClient.cs
/// <summary>
/// Joins the client to the specified channels.
/// </summary>
/// <param name="channelNames">The names of the channels.</param>
/// <returns>False if error.</returns>
Joins the client to the specified channels.
Joins the client to the specified channels .
public bool JoinChannels(List<string>? channelNames) {
            if (channelNames == null) {
                LogLine($"Null {nameof(channelNames)}", LogLevel.Warn);
                return false;
            }
            if (!SocketIsReady)
                return false;
            foreach (var channelName in channelNames) {
                if (string.IsNullOrEmpty(channelName)) {
                    LogLine($"null/empty {nameof(channelName)}", LogLevel.Warn);
                    continue;
                }
                socket.Send($"JOIN #{channelName}");
            }
            return true;
        }
public bool JoinChannels ( List < string > ? channelNames ) { if ( channelNames == null ) { LogLine ( $" Null  { nameof ( channelNames ) } " , LogLevel . Warn ) ; return false ; } if ( ! SocketIsReady ) return false ; foreach ( var channelName in channelNames ) { if ( string . IsNullOrEmpty ( channelName ) ) { LogLine ( $" null/empty  { nameof ( channelName ) } " , LogLevel . Warn ) ; continue ; } socket . Send ( $" JOIN # { channelName } " ) ; } return true ; }
Joins the client to the specified channels.
Joins the client to the specified channels .
False if error.
False if error .
channelNames
List<string>?
The names of the channels.
The names of the channels .