refactor: replace verbose checks with String.IsNullOrEmpty where applicable.

Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
This commit is contained in:
Justin Clark-Casey (justincc)
2013-11-15 21:45:08 +00:00
parent b4932bda2a
commit 7cab41f422
30 changed files with 46 additions and 47 deletions

View File

@@ -822,11 +822,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
{
string requrl = String.Format(m_vivoxChannelPath, m_vivoxServer, "create", channelId, m_authToken);
if (parent != null && parent != String.Empty)
if (!string.IsNullOrEmpty(parent))
{
requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
}
if (description != null && description != String.Empty)
if (!string.IsNullOrEmpty(description))
{
requrl = String.Format("{0}&chan_desc={1}", requrl, description);
}
@@ -862,7 +862,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
// requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
// }
if (description != null && description != String.Empty)
if (!string.IsNullOrEmpty(description))
{
requrl = String.Format("{0}&chan_desc={1}", requrl, description);
}
@@ -1047,7 +1047,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice
private XmlElement VivoxDeleteChannel(string parent, string channelid)
{
string requrl = String.Format(m_vivoxChannelDel, m_vivoxServer, "delete", channelid, m_authToken);
if (parent != null && parent != String.Empty)
if (!string.IsNullOrEmpty(parent))
{
requrl = String.Format("{0}&chan_parent={1}", requrl, parent);
}