private string getNegString(RequestFormatType requestFormatType) { /* VOLDEMORT_V0("vp0", "voldemort-native-v0"), VOLDEMORT_V1("vp1", "voldemort-native-v1"), VOLDEMORT_V2("vp2", "voldemort-native-v2"), PROTOCOL_BUFFERS("pb0", "protocol-buffers-v0"), ADMIN_PROTOCOL_BUFFERS("ad1", "admin-v1"); * */ string value = null; switch (requestFormatType) { case RequestFormatType.ADMIN_HANDLER: value = "ad1"; break; case RequestFormatType.PROTOCOL_BUFFERS: value = "pb0"; break; default: throw new NotSupportedException("RequestFormatType of \"" + requestFormatType + "\" is not supported."); } return value; }
public Connection Checkout(string host, int port, RequestFormatType requestFormatType) { string negString = getNegString(requestFormatType); return Checkout(host, port, negString); }