ReSharper redundant code cleanup

This commit is contained in:
Lucas Nicodemus 2011-12-30 14:32:05 -07:00
parent fd51214146
commit 1147788154
21 changed files with 148 additions and 150 deletions

View file

@ -57,7 +57,7 @@ namespace TShockAPI.DB
int count = 0;
foreach (SqlValue where in wheres)
{
sbwheres.Append(where.Name + "=" + where.Value.ToString());
sbwheres.Append(where.Name + "=" + where.Value);
if (count != wheres.Count - 1)
sbwheres.Append(" AND ");
count++;
@ -74,7 +74,7 @@ namespace TShockAPI.DB
int count = 0;
foreach (SqlValue value in values)
{
sbvalues.Append(value.Name + "=" + value.Value.ToString());
sbvalues.Append(value.Name + "=" + value.Value);
if (count != values.Count - 1)
sbvalues.Append(",");
count++;
@ -82,7 +82,7 @@ namespace TShockAPI.DB
count = 0;
foreach (SqlValue where in wheres)
{
sbwheres.Append(where.Name + "=" + where.Value.ToString());
sbwheres.Append(where.Name + "=" + where.Value);
if (count != wheres.Count - 1)
sbwheres.Append(" AND ");
count++;
@ -124,7 +124,7 @@ namespace TShockAPI.DB
foreach (SqlValue where in wheres)
{
sbwheres.Append(where.Name + "=" + where.Value.ToString());
sbwheres.Append(where.Name + "=" + where.Value);
if (count != wheres.Count - 1)
sbwheres.Append(" AND ");
count++;
@ -186,7 +186,7 @@ namespace TShockAPI.DB
int count = 0;
foreach (SqlValue where in wheres)
{
sbwheres.Append(where.Name + "=" + where.Value.ToString());
sbwheres.Append(where.Name + "=" + where.Value);
if (count != wheres.Count - 1)
sbwheres.Append(" AND ");
count++;
@ -203,7 +203,7 @@ namespace TShockAPI.DB
int count = 0;
foreach (SqlValue value in values)
{
sbvalues.Append(value.Name + "=" + value.Value.ToString());
sbvalues.Append(value.Name + "=" + value.Value);
if (count != values.Count - 1)
sbvalues.Append("AND");
count++;
@ -211,7 +211,7 @@ namespace TShockAPI.DB
count = 0;
foreach (SqlValue where in wheres)
{
sbwheres.Append(where.Name + "=" + where.Value.ToString());
sbwheres.Append(where.Name + "=" + where.Value);
if (count != wheres.Count - 1)
sbwheres.Append(" AND ");
count++;
@ -254,7 +254,7 @@ namespace TShockAPI.DB
foreach (SqlValue where in wheres)
{
sbwheres.Append(where.Name + "=" + where.Value.ToString());
sbwheres.Append(where.Name + "=" + where.Value);
if (count != wheres.Count - 1)
sbwheres.Append(" AND ");
count++;

View file

@ -20,7 +20,6 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Xml;

View file

@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Data;
using MySql.Data.MySqlClient;
using Terraria;

View file

@ -1,5 +1,5 @@
using System.Data;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Data;
namespace TShockAPI.DB
{

View file

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Xml;
using MySql.Data.MySqlClient;
@ -31,7 +31,7 @@ namespace TShockAPI.DB
{
private IDbConnection database;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
public WarpManager(IDbConnection db)
{
database = db;