private static ProcedureCacheEntry GetProcData(MySqlConnection connection, string spName)
{
string text = string.Empty;
string text2 = spName;
int num = spName.IndexOf(".");
if (num != -1)
{
text = spName.Substring(0, num);
text2 = spName.Substring(num + 1, spName.Length - num - 1);
}
string[] array = new string[4];
array[1] = ((text.Length > 0) ? text : connection.CurrentDatabase());
array[2] = text2;
MySqlSchemaCollection schemaCollection = connection.GetSchemaCollection("procedures", array);
if (schemaCollection.Rows.Count > 1)
{
throw new MySqlException(Resources.ProcAndFuncSameName);
}
if (schemaCollection.Rows.Count == 0)
{
throw new MySqlException(string.Format(Resources.InvalidProcName, text2, text));
}
ProcedureCacheEntry procedureCacheEntry = new ProcedureCacheEntry();
procedureCacheEntry.procedure = schemaCollection;
ISSchemaProvider iSSchemaProvider = new ISSchemaProvider(connection);
string[] restrictions = iSSchemaProvider.CleanRestrictions(array);
MySqlSchemaCollection procedureParameters = iSSchemaProvider.GetProcedureParameters(restrictions, schemaCollection);
procedureCacheEntry.parameters = procedureParameters;
return(procedureCacheEntry);
}