private static void ensureProtocol(string protocol) { var supportedProtocols = new[] { ResProtocol.ResClient01 }; if (supportedProtocols.Contains(protocol) == false) throw new UnsupportedProtocolException(protocol, supportedProtocols); }