aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
diff options
context:
space:
mode:
authorlbsa712007-10-30 09:05:31 +0000
committerlbsa712007-10-30 09:05:31 +0000
commit67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch)
tree20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
parent* Deleted .user file (diff)
downloadopensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2
opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz
* Optimized usings
* Shortened type references * Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/CachedUserInfo.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/CachedUserInfo.cs37
1 files changed, 18 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 2d639d6..8fbc3fd 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -26,7 +26,6 @@
26* 26*
27*/ 27*/
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Framework;
30 29
31namespace OpenSim.Framework.Communications.Cache 30namespace OpenSim.Framework.Communications.Cache
32{ 31{
@@ -45,22 +44,22 @@ namespace OpenSim.Framework.Communications.Cache
45 // Methods 44 // Methods
46 public void FolderReceive(LLUUID userID, InventoryFolderImpl folderInfo) 45 public void FolderReceive(LLUUID userID, InventoryFolderImpl folderInfo)
47 { 46 {
48 if (userID == this.UserProfile.UUID) 47 if (userID == UserProfile.UUID)
49 { 48 {
50 if (this.RootFolder == null) 49 if (RootFolder == null)
51 { 50 {
52 if (folderInfo.parentID == LLUUID.Zero) 51 if (folderInfo.parentID == LLUUID.Zero)
53 { 52 {
54 this.RootFolder = folderInfo; 53 RootFolder = folderInfo;
55 } 54 }
56 } 55 }
57 else if (this.RootFolder.folderID == folderInfo.parentID) 56 else if (RootFolder.folderID == folderInfo.parentID)
58 { 57 {
59 this.RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo); 58 RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
60 } 59 }
61 else 60 else
62 { 61 {
63 InventoryFolderImpl folder = this.RootFolder.HasSubFolder(folderInfo.parentID); 62 InventoryFolderImpl folder = RootFolder.HasSubFolder(folderInfo.parentID);
64 if (folder != null) 63 if (folder != null)
65 { 64 {
66 folder.SubFolders.Add(folderInfo.folderID, folderInfo); 65 folder.SubFolders.Add(folderInfo.folderID, folderInfo);
@@ -71,18 +70,18 @@ namespace OpenSim.Framework.Communications.Cache
71 70
72 public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo) 71 public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo)
73 { 72 {
74 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null)) 73 if ((userID == UserProfile.UUID) && (RootFolder != null))
75 { 74 {
76 if (itemInfo.parentFolderID == this.RootFolder.folderID) 75 if (itemInfo.parentFolderID == RootFolder.folderID)
77 { 76 {
78 this.RootFolder.Items.Add(itemInfo.inventoryID, itemInfo); 77 RootFolder.Items.Add(itemInfo.inventoryID, itemInfo);
79 } 78 }
80 else 79 else
81 { 80 {
82 InventoryFolderImpl folder = this.RootFolder.HasSubFolder(itemInfo.parentFolderID); 81 InventoryFolderImpl folder = RootFolder.HasSubFolder(itemInfo.parentFolderID);
83 if (folder != null) 82 if (folder != null)
84 { 83 {
85 folder.Items.Add(itemInfo.inventoryID, itemInfo); 84 folder.Items.Add(itemInfo.inventoryID, itemInfo);
86 } 85 }
87 } 86 }
88 } 87 }
@@ -90,30 +89,30 @@ namespace OpenSim.Framework.Communications.Cache
90 89
91 public void AddItem(LLUUID userID, InventoryItemBase itemInfo) 90 public void AddItem(LLUUID userID, InventoryItemBase itemInfo)
92 { 91 {
93 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null)) 92 if ((userID == UserProfile.UUID) && (RootFolder != null))
94 { 93 {
95 this.ItemReceive(userID, itemInfo); 94 ItemReceive(userID, itemInfo);
96 this.m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); 95 m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo);
97 } 96 }
98 } 97 }
99 98
100 public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo) 99 public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo)
101 { 100 {
102 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null)) 101 if ((userID == UserProfile.UUID) && (RootFolder != null))
103 { 102 {
104 this.m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); 103 m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo);
105 } 104 }
106 } 105 }
107 106
108 public bool DeleteItem(LLUUID userID, InventoryItemBase item) 107 public bool DeleteItem(LLUUID userID, InventoryItemBase item)
109 { 108 {
110 bool result = false; 109 bool result = false;
111 if ((userID == this.UserProfile.UUID) && (this.RootFolder != null)) 110 if ((userID == UserProfile.UUID) && (RootFolder != null))
112 { 111 {
113 result = RootFolder.DeleteItem(item.inventoryID); 112 result = RootFolder.DeleteItem(item.inventoryID);
114 if (result) 113 if (result)
115 { 114 {
116 this.m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item); 115 m_parentCommsManager.InventoryService.DeleteInventoryItem(userID, item);
117 } 116 }
118 } 117 }
119 return result; 118 return result;