private bool EnsureMethodsExist(string[] methods)
{
foreach (var unit in units)
{
if (unit.Rule.Where != null)
{
var method = string.Format("{0}.Where", unit.ClassName);
if (!methods.Contains(method))
return false;
}
if (unit.Rule.Select != null)
{
var method = string.Format("{0}.Select", unit.ClassName);
if (!methods.Contains(method))
return false;
}
if (unit.Rule.Update != null)
{
var method = string.Format("{0}.Update", unit.ClassName);
if (!methods.Contains(method))
return false;
}
if (unit.Rule.Inserts != null)
{
for (int i = 0; i < unit.Rule.Inserts.Length; i++)
{
var method = string.Format("{0}.Insert_{1}", unit.ClassName, i);
if (!methods.Contains(method))
return false;
}
}
}
return true;
}