protected static string?GetRawMessage(SlackSocketMessage message) { // ReSharper disable once SuspiciousTypeConversion.Global if (message is not IRawMessage rawMessage) { throw new InvalidCastException($"'{message.GetType().FullName}' is not a proxy class and cannot be casted to IRawMessage"); }
private string GetRawMessage(SlackSocketMessage message) { IRawMessage rawMessage = message as IRawMessage; if (rawMessage == null) { throw new InvalidCastException($"'{message.GetType().FullName}' is not a proxy class and cannot be casted to IRawMessage"); } else { return(rawMessage.Data); } }
private string GetRawMessage(SlackSocketMessage message) { IRawMessage rawMessage = message as IRawMessage; if (rawMessage == null) { throw new InvalidCastException($"'{message.GetType().FullName}' is not a proxy class and cannot be casted to IRawMessage"); } else { return rawMessage.Data; } }