static Type FindClientType(Type interfaceType)
{
var methods = interfaceType.GetMethods();
foreach (var method in methods)
{
if (method.Name != "Insert" && method.Name != "Update" && method.Name != "Upsert")
continue;
var @params = method.GetParameters();
if (@params.Length != 1)
continue;
return @params[0].ParameterType;
}
throw new BTDBException($"Cannot deduce client type from interface {interfaceType.Name}");
}