== string.Empty is .Lenght == 0

This commit is contained in:
UbitUmarov
2022-01-13 20:31:52 +00:00
parent 6595e3ae26
commit fbbcc1edd7
149 changed files with 261 additions and 264 deletions

View File

@@ -62,12 +62,12 @@ namespace OpenSim.Server.Handlers.Hypergrid
string theService = serverConfig.GetString("LocalServiceModule",
String.Empty);
if (theService == String.Empty)
if (theService.Length == 0)
throw new Exception("No LocalServiceModule in config file");
m_TheService = ServerUtils.LoadPlugin<IHGFriendsService>(theService, args);
theService = serverConfig.GetString("UserAgentService", string.Empty);
if (theService == String.Empty)
if (theService.Length == 0)
throw new Exception("No UserAgentService in " + m_ConfigName);
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(theService, new Object[] { config, localConn });

View File

@@ -186,7 +186,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
if (request.ContainsKey("SECRET"))
secret = request["SECRET"].ToString();
if (secret == string.Empty)
if (secret.Length == 0)
return BoolResult(false);
bool success = m_TheService.DeleteFriendship(friend, secret);
@@ -303,7 +303,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
string sessionStr = request["SESSIONID"].ToString();
UUID sessionID;
if (!UUID.TryParse(sessionStr, out sessionID) || serviceKey == string.Empty)
if (!UUID.TryParse(sessionStr, out sessionID) || serviceKey.Length == 0)
return false;
if (!m_UserAgentService.VerifyAgent(sessionID, serviceKey))

View File

@@ -73,7 +73,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
int sizeX = 256;
int sizeY = 256;
m_log.DebugFormat("[HG Handler]: XMLRequest to link to {0} from {1}", (name == string.Empty) ? "default region" : name, remoteClient.Address.ToString());
m_log.DebugFormat("[HG Handler]: XMLRequest to link to {0} from {1}", (name.Length == 0) ? "default region" : name, remoteClient.Address.ToString());
bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason, out sizeX, out sizeY);
Hashtable hash = new Hashtable();