ChatClient/ChatClient.cs
/// <summary>
/// Parts the client from the specified channel.
/// </summary>
/// <param name="channelName">The name of the channel.</param>
/// <returns>False if error.</returns>
Parts the client from the specified channel.
Parts the client from the specified channel .
public bool PartChannel(string? channelName) {
            if (string.IsNullOrEmpty(channelName)) {
                LogLine($"null/empty {nameof(channelName)}", LogLevel.Warn);
                return false;
            }
            if (!SocketIsReady)
                return false;
            socket.Send($"PART #{channelName}");
            _channels.TryRemove(channelName, out _);
            ClientParted?.Invoke(this, new ClientPartedArgs(channelName));
            return true;
        }
public bool PartChannel ( string ? channelName ) { if ( string . IsNullOrEmpty ( channelName ) ) { LogLine ( $" null/empty  { nameof ( channelName ) } " , LogLevel . Warn ) ; return false ; } if ( ! SocketIsReady ) return false ; socket . Send ( $" PART # { channelName } " ) ; _channels . TryRemove ( channelName , out _ ) ; ClientParted ? . Invoke ( this , new ClientPartedArgs ( channelName ) ) ; return true ; }
Parts the client from the specified channel.
Parts the client from the specified channel .
False if error.
False if error .
channelName
string?
The name of the channel.
The name of the channel .