static ClientConfig() { int index = 0; KeyValuePair <string, AProtocol>[] supportedProtocols = getSupportedProcotols(); SUPPORTED_PROTOCOLS = new string[supportedProtocols.Length]; foreach (var pair in supportedProtocols) { SUPPORTED_PROTOCOLS[index++] = pair.Key; PROTOCOL_FACTORY.RegisterProtocol(pair.Key, pair.Value); } }