From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 1 Oct 2009 01:00:09 +0900 Subject: Formatting cleanup. --- .../Cache/UserProfileCacheService.cs | 34 +++++++++++----------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs') diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 7f1c7e9..2a1da50 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache /// User profiles indexed by name /// private readonly Dictionary m_userProfilesByName - = new Dictionary(); + = new Dictionary(); /// /// The root library folder. @@ -125,26 +125,26 @@ namespace OpenSim.Framework.Communications.Cache /// /// If the user isn't in cache then the user is requested from the profile service. /// - /// null if no user details are found + /// null if no user details are found public CachedUserInfo GetUserDetails(string fname, string lname) { lock (m_userProfilesByName) - { + { CachedUserInfo userInfo; - if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) + if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo)) { return userInfo; - } + } else - { + { UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname); if (userProfile != null) - return AddToCaches(userProfile); + return AddToCaches(userProfile); else return null; - } + } } } @@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache // probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via // returning a read only class from the cache). // public bool StoreProfile(UserProfileData userProfile) -// { +// { // lock (m_userProfilesById) -// { +// { // CachedUserInfo userInfo = GetUserDetails(userProfile.ID); -// +// // if (userInfo != null) // { -// userInfo.m_userProfile = userProfile; +// userInfo.m_userProfile = userProfile; // m_commsManager.UserService.UpdateUserProfile(userProfile); -// +// // return true; // } // } -// +// // return false; // } @@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache } } - return createdUserInfo; + return createdUserInfo; } /// @@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache { if (m_userProfilesById.ContainsKey(userId)) { - CachedUserInfo userInfo = m_userProfilesById[userId]; + CachedUserInfo userInfo = m_userProfilesById[userId]; m_userProfilesById.Remove(userId); lock (m_userProfilesByName) @@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache return true; } - } + } return false; } -- cgit v1.1