refactor: Use simpler auto-implemented property for HttpPort in GridRegion

ghosts
Justin Clark-Casey (justincc) 2014-10-03 01:22:25 +01:00
parent 277dbb9acd
commit c3b1c72c33
1 changed files with 5 additions and 10 deletions

View File

@ -135,12 +135,7 @@ namespace OpenSim.Services.Interfaces
/// <summary> /// <summary>
/// The port by which http communication occurs with the region /// The port by which http communication occurs with the region
/// </summary> /// </summary>
public uint HttpPort public uint HttpPort { get; set; }
{
get { return m_httpPort; }
set { m_httpPort = value; }
}
protected uint m_httpPort;
/// <summary> /// <summary>
/// A well-formed URI for the host region server (namely "http://" + ExternalHostName) /// A well-formed URI for the host region server (namely "http://" + ExternalHostName)
@ -151,10 +146,10 @@ namespace OpenSim.Services.Interfaces
if (!String.IsNullOrEmpty(m_serverURI)) { if (!String.IsNullOrEmpty(m_serverURI)) {
return m_serverURI; return m_serverURI;
} else { } else {
if (m_httpPort == 0) if (HttpPort == 0)
return "http://" + m_externalHostName + "/"; return "http://" + m_externalHostName + "/";
else else
return "http://" + m_externalHostName + ":" + m_httpPort + "/"; return "http://" + m_externalHostName + ":" + HttpPort + "/";
} }
} }
set { set {
@ -290,7 +285,7 @@ namespace OpenSim.Services.Interfaces
RegionSizeY = (int)ConvertFrom.RegionSizeY; RegionSizeY = (int)ConvertFrom.RegionSizeY;
m_internalEndPoint = ConvertFrom.InternalEndPoint; m_internalEndPoint = ConvertFrom.InternalEndPoint;
m_externalHostName = ConvertFrom.ExternalHostName; m_externalHostName = ConvertFrom.ExternalHostName;
m_httpPort = ConvertFrom.HttpPort; HttpPort = ConvertFrom.HttpPort;
RegionID = ConvertFrom.RegionID; RegionID = ConvertFrom.RegionID;
ServerURI = ConvertFrom.ServerURI; ServerURI = ConvertFrom.ServerURI;
TerrainImage = ConvertFrom.RegionSettings.TerrainImageID; TerrainImage = ConvertFrom.RegionSettings.TerrainImageID;
@ -310,7 +305,7 @@ namespace OpenSim.Services.Interfaces
RegionSizeY = ConvertFrom.RegionSizeY; RegionSizeY = ConvertFrom.RegionSizeY;
m_internalEndPoint = ConvertFrom.InternalEndPoint; m_internalEndPoint = ConvertFrom.InternalEndPoint;
m_externalHostName = ConvertFrom.ExternalHostName; m_externalHostName = ConvertFrom.ExternalHostName;
m_httpPort = ConvertFrom.HttpPort; HttpPort = ConvertFrom.HttpPort;
RegionID = ConvertFrom.RegionID; RegionID = ConvertFrom.RegionID;
ServerURI = ConvertFrom.ServerURI; ServerURI = ConvertFrom.ServerURI;
TerrainImage = ConvertFrom.TerrainImage; TerrainImage = ConvertFrom.TerrainImage;