..Equals() is also not good

This commit is contained in:
UbitUmarov
2022-03-14 20:21:18 +00:00
parent 56c497adf5
commit 2a196190d9
4 changed files with 8 additions and 7 deletions

View File

@@ -541,10 +541,10 @@ namespace OpenSim.Framework
args["controllers"] = controls;
}
if ((CallbackURI != null) && (!CallbackURI.Equals("")))
if (!string.IsNullOrEmpty(CallbackURI))
args["callback_uri"] = OSD.FromString(CallbackURI);
if ((NewCallbackURI != null) && (!NewCallbackURI.Equals("")))
if (!string.IsNullOrEmpty(NewCallbackURI))
args["cb_uri"] = OSD.FromString(NewCallbackURI);
// Attachment objects for fatpack messages

View File

@@ -757,6 +757,7 @@ namespace OpenSim.Framework
event DeRezObject OnDeRezObject;
event RezRestoreToWorld OnRezRestoreToWorld;
event Action<IClientAPI> OnRegionHandShakeReply;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly")]
event GenericCall1 OnRequestWearables;
event Action<IClientAPI, bool> OnCompleteMovementToRegion;

View File

@@ -1090,7 +1090,7 @@ namespace OpenSim.Framework
{
OSDMap args = new OSDMap();
args["region_id"] = OSD.FromUUID(RegionID);
if ((RegionName != null) && !RegionName.Equals(""))
if (!string.IsNullOrEmpty(RegionName))
args["region_name"] = OSD.FromString(RegionName);
args["external_host_name"] = OSD.FromString(ExternalHostName);
args["http_port"] = OSD.FromString(HttpPort.ToString());
@@ -1104,10 +1104,10 @@ namespace OpenSim.Framework
args["internal_ep_address"] = OSD.FromString(InternalEndPoint.Address.ToString());
args["internal_ep_port"] = OSD.FromString(InternalEndPoint.Port.ToString());
if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
if (!string.IsNullOrEmpty(RemotingAddress))
args["remoting_address"] = OSD.FromString(RemotingAddress);
args["remoting_port"] = OSD.FromString(RemotingPort.ToString());
if ((proxyUrl != null) && !proxyUrl.Equals(""))
if (!string.IsNullOrEmpty(proxyUrl))
args["proxy_url"] = OSD.FromString(proxyUrl);
if (RegionType != String.Empty)
args["region_type"] = OSD.FromString(RegionType);

View File

@@ -411,8 +411,8 @@ namespace OpenSim.Region.CoreModules.Scripting.EmailModules
for (i = 0; i < queue.Count; i++)
{
if ((sender == null || sender.Equals("") || sender.Equals(queue[i].sender)) &&
(subject == null || subject.Equals("") || subject.Equals(queue[i].subject)))
if ((string.IsNullOrEmpty(sender) || sender.Equals(queue[i].sender)) &&
(string.IsNullOrEmpty(subject) || subject.Equals(queue[i].subject)))
{
break;
}