public IMessageHandler ProcessMessage(IMessageHandler interface37_0) { string destUserID; List <string> groupMemberList; IHeader interface3; if (interface37_0.Header.MessageType == this.object_0.GetContracts) { ReqContactsContract contract4 = this.interface9_0.imethod_1 <ReqContactsContract>(interface37_0); List <string> users = new List <string>(); if (this.icontactsManager_0 != null) { users = this.icontactsManager_0.GetContacts(interface37_0.Header.UserID); if (contract4.JustOnline) { users = this.ginterface8_0.SelectOnlineUserFrom(users); } } ResContactsContract body = new ResContactsContract(users); interface3 = this.interface9_0.imethod_7(interface37_0.Header); return(this.interface9_0.imethod_2 <ResContactsContract>(interface3, body)); } if (interface37_0.Header.MessageType == this.object_0.GetGroupMembers) { GroupContract contract7 = this.interface9_0.imethod_1 <GroupContract>(interface37_0); groupMemberList = this.icontactsManager_0.GetGroupMemberList(contract7.GroupID); GroupmatesContract contract = null; if (groupMemberList != null) { List <string> online = new List <string>(); List <string> offline = new List <string>(); foreach (string str2 in groupMemberList) { if (this.iuserManager_0.IsUserOnLine(str2)) { online.Add(str2); } else { offline.Add(str2); } } contract = new GroupmatesContract(online, offline); } interface3 = this.interface9_0.imethod_7(interface37_0.Header); return(this.interface9_0.imethod_2 <GroupmatesContract>(interface3, contract)); } if (interface37_0.Header.MessageType == this.object_0.BroadcastByServer) { bool flag1 = interface37_0.Header.MessageType == this.object_0.BroadcastByServer; destUserID = interface37_0.Header.DestUserID; BroadcastContract contract2 = this.interface9_0.imethod_1 <BroadcastContract>(interface37_0); if (this.BroadcastReceived != null) { this.BroadcastReceived(interface37_0.Header.UserID, destUserID, contract2.InformationType, contract2.Content, contract2.Tag); } groupMemberList = this.icontactsManager_0.GetGroupMemberList(destUserID); if (groupMemberList != null) { BroadcastInformation information = new BroadcastInformation(interface37_0.Header.UserID, destUserID, contract2.InformationType, contract2.Content, contract2.Tag); foreach (string str3 in groupMemberList) { if (str3 != interface37_0.Header.UserID) { if (this.ginterface8_0.IsUserOnLine(str3)) { this.interface40_0.PostMessage(interface37_0, str3, contract2.ActionTypeOnChannelIsBusy); } else if (this.BroadcastFailed != null) { this.BroadcastFailed(str3, information); } } } } return(null); } if (interface37_0.Header.MessageType == this.object_0.BroadcastBlob) { destUserID = interface37_0.Header.DestUserID; if (this.bool_4 && (this.BroadcastReceived != null)) { BlobFragmentContract contract5 = this.interface9_0.imethod_1 <BlobFragmentContract>(interface37_0); Information information2 = this.class76_0.method_1(interface37_0.Header.UserID, destUserID, contract5); if (information2 != null) { BlobAndTagContract contract6 = CompactPropertySerializer.Default.Deserialize <BlobAndTagContract>(information2.Content, 0); this.BroadcastReceived(interface37_0.Header.UserID, destUserID, contract5.InformationType, contract6.Message, contract6.Tag); } } groupMemberList = this.icontactsManager_0.GetGroupMemberList(destUserID); if (groupMemberList != null) { foreach (string str3 in groupMemberList) { if (str3 != interface37_0.Header.UserID) { this.interface40_0.PostMessage(interface37_0, str3, ActionTypeOnChannelIsBusy.Continue); } } } return(null); } return(null); }
public IMessageHandler ProcessMessage(IMessageHandler interface37_0) { List <string> groupMembers; string destUserID; if (interface37_0.Header.MessageType == this.object_0.GetGroupMembers) { GroupContract contract4 = this.interface9_0.imethod_1 <GroupContract>(interface37_0); groupMembers = this.igroupManager_0.GetGroupMembers(contract4.GroupID); GroupmatesContract body = null; if (groupMembers != null) { List <string> online = new List <string>(); List <string> offline = new List <string>(); foreach (string str in groupMembers) { if (this.iuserManager_0.IsUserOnLine(str)) { online.Add(str); } else { offline.Add(str); } } body = new GroupmatesContract(online, offline); } IHeader interface3 = this.interface9_0.imethod_7(interface37_0.Header); return(this.interface9_0.imethod_2 <GroupmatesContract>(interface3, body)); } if (interface37_0.Header.MessageType == this.object_0.BroadcastByServer) { bool flag1 = interface37_0.Header.MessageType == this.object_0.BroadcastByServer; destUserID = interface37_0.Header.DestUserID; BroadcastContract contract2 = this.interface9_0.imethod_1 <BroadcastContract>(interface37_0); if (this.BroadcastReceived != null) { this.BroadcastReceived(interface37_0.Header.UserID, destUserID, contract2.InformationType, contract2.Content); } groupMembers = this.igroupManager_0.GetGroupMembers(destUserID); if (groupMembers != null) { foreach (string str2 in groupMembers) { if (str2 != interface37_0.Header.UserID) { this.interface40_0.PostMessage(interface37_0, str2, contract2.ActionTypeOnChannelIsBusy); } } } return(null); } if (interface37_0.Header.MessageType == this.object_0.BroadcastBlob) { destUserID = interface37_0.Header.DestUserID; if (this.bool_4 && (this.BroadcastReceived != null)) { BlobFragmentContract contract3 = this.interface9_0.imethod_1 <BlobFragmentContract>(interface37_0); Information information = this.class76_0.method_1(interface37_0.Header.UserID, destUserID, contract3); if (information != null) { this.BroadcastReceived(interface37_0.Header.UserID, destUserID, contract3.InformationType, information.Content); } } groupMembers = this.igroupManager_0.GetGroupMembers(destUserID); if (groupMembers != null) { foreach (string str2 in groupMembers) { if (str2 != interface37_0.Header.UserID) { this.interface40_0.PostMessage(interface37_0, str2, ActionTypeOnChannelIsBusy.Continue); } } } return(null); } return(null); }