LIBOMV-686 Implements new event patterns based on the Microsoft Framework Design Guidelines in GroupManager

* BREAKING CHANGE * this is a major shift in the way events are internally handled.

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3162 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
Jim Radford
2009-10-20 20:18:03 +00:00
parent 9f8d0d49f0
commit b0cb77e1e5
12 changed files with 869 additions and 408 deletions

View File

@@ -64,9 +64,8 @@ namespace OpenMetaverse.TestClient
else
return resolvedGroupName;
}
GroupManager.GroupJoinedCallback gcallback = new GroupManager.GroupJoinedCallback(Groups_OnGroupJoined);
Client.Groups.OnGroupJoined += gcallback;
Client.Groups.GroupJoinedReply += Groups_OnGroupJoined;
Client.Groups.RequestJoinGroup(resolvedGroupID);
/* A.Biondi
@@ -75,7 +74,7 @@ namespace OpenMetaverse.TestClient
GetGroupsSearchEvent.WaitOne(60000, false);
Client.Groups.OnGroupJoined -= gcallback;
Client.Groups.GroupJoinedReply -= Groups_GroupJoined;
GetGroupsSearchEvent.Reset();
Client.ReloadGroupsCache();
@@ -84,6 +83,11 @@ namespace OpenMetaverse.TestClient
return "Unable to join the group " + resolvedGroupName;
}
void Groups_GroupJoined(object sender, GroupOperationEventArgs e)
{
throw new NotImplementedException();
}
void Directory_DirGroups(object sender, DirGroupsReplyEventArgs e)
{
if (queryID == e.QueryID)
@@ -126,9 +130,9 @@ namespace OpenMetaverse.TestClient
}
}
void Groups_OnGroupJoined(UUID groupID, bool success)
void Groups_OnGroupJoined(object sender, GroupOperationEventArgs e)
{
Console.WriteLine(Client.ToString() + (success ? " joined " : " failed to join ") + groupID.ToString());
Console.WriteLine(Client.ToString() + (e.Success ? " joined " : " failed to join ") + e.GroupID.ToString());
/* A.Biondi
* This code is not necessary because it is yet present in the
@@ -144,7 +148,7 @@ namespace OpenMetaverse.TestClient
*/
joinedGroup = success;
joinedGroup = e.Success;
GetGroupsSearchEvent.Set();
}
}