public IEnumerable<SqlCommand> CreateCommands(IMethodCallMessage mcm, SqlConnection connection, string schemaName, out SqlParameter returnValue, out SqlParameter[] outParameters, out ISerializationTypeInfo returnTypeInfo, out ICallDeserializationInfo procInfo, out XmlNameTable xmlNameTable,
     IList<IDisposable> disposeList)
 {
     List<SqlCommand> sqlCommands = new List<SqlCommand>();
     SqlCommand sqlCommand = methods[mcm.MethodBase].GetCommand(mcm, connection, out returnValue, out outParameters, out returnTypeInfo, out procInfo, out xmlNameTable, disposeList);
     sqlCommands.Add(sqlCommand);
     return sqlCommands;
 }
 public SqlCommand GetCommand(IMethodCallMessage mcm, SqlConnection connection, out SqlParameter returnParameter, out SqlParameter[] outArgs, out ISerializationTypeInfo procedureReturnTypeInfo, out ICallDeserializationInfo procedureInfo, out XmlNameTable xmlNameTable, IList<IDisposable> disposeList)
 {
     SqlCommand result = connection.CreateCommand();
     result.CommandText = ProcedureName;
     result.CommandType = CommandType.StoredProcedure;
     if (timeout > 0) {
         result.CommandTimeout = timeout;
     }
     outArgs = new SqlParameter[outArgCount];
     xmlNameTable = xmlNameTableParameter != null ? (XmlNameTable)mcm.GetArg(xmlNameTableParameter.Position) : null;
     foreach (SqlCallParameterInfo factory in parameters) {
         result.Parameters.Add(factory.GetSqlParameter(result, mcm, outArgs, disposeList));
     }
     if (useReturnValue) {
         returnParameter = result.CreateParameter();
         returnParameter.SqlDbType = SqlDbType.Int;
         returnParameter.Direction = ParameterDirection.ReturnValue;
         result.Parameters.Add(returnParameter);
     } else {
         returnParameter = null;
     }
     procedureReturnTypeInfo = returnTypeInfo;
     procedureInfo = this;
     return result;
 }