From ee7cfc2854aba3572d5342b8c1bfd5bf4ea93841 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 21 Mar 2011 22:47:02 +0000 Subject: refactor: use EstateDataService property directly instead of loading it into a local variable --- OpenSim/Region/Application/OpenSimBase.cs | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f804cb7..eae3686 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -798,12 +798,8 @@ namespace OpenSim /// public void PopulateRegionEstateInfo(RegionInfo regInfo) { - IEstateDataService estateDataService = EstateDataService; - - if (estateDataService != null) - { - regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, false); - } + if (EstateDataService != null) + regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, false); if (regInfo.EstateSettings.EstateID == 0) // No record at all { @@ -814,7 +810,7 @@ namespace OpenSim if (response == "no") { // Create a new estate - regInfo.EstateSettings = estateDataService.LoadEstateSettings(regInfo.RegionID, true); + regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true); regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); @@ -828,7 +824,7 @@ namespace OpenSim } else { - List estates = estateDataService.LoadEstateSettingsAll(); + List estates = EstateDataService.LoadEstateSettingsAll(); List estateNames = new List(); foreach (EstateSettings estate in estates) @@ -843,7 +839,7 @@ namespace OpenSim if (response == "None") continue; - List estateIDs = estateDataService.GetEstates(response); + List estateIDs = EstateDataService.GetEstates(response); if (estateIDs.Count < 1) { MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); @@ -852,9 +848,9 @@ namespace OpenSim int estateID = estateIDs[0]; - regInfo.EstateSettings = estateDataService.LoadEstateSettings(estateID); + regInfo.EstateSettings = EstateDataService.LoadEstateSettings(estateID); - if (estateDataService.LinkRegion(regInfo.RegionID, estateID)) + if (EstateDataService.LinkRegion(regInfo.RegionID, estateID)) break; MainConsole.Instance.Output("Joining the estate failed. Please try again."); @@ -863,7 +859,6 @@ namespace OpenSim } } } - public class OpenSimConfigSource { -- cgit v1.1