Diverse Verbesserungen im AndroidChat
This commit is contained in:
@@ -41,6 +41,9 @@ namespace BeWoPlanerAndroid
|
||||
|
||||
SoapHibernateSessionManager.ConfigureHibernateSession();
|
||||
|
||||
var derTimeout = Session.Timeout;
|
||||
Debug.WriteLine("Timeout der Session: " + derTimeout);
|
||||
|
||||
var s = new UserServiceImp();
|
||||
|
||||
if(s.IsUserValid(pUsername, pPassword, null, "SOAPClient", false) == UserValidationResult.UserValid)
|
||||
@@ -100,24 +103,6 @@ namespace BeWoPlanerAndroid
|
||||
|
||||
var messages = DAOFactory.SearchDAO.FindAllChatMessagesForAndroid(pSenderPersonOid, pRecipientPersonOid, exceptions, pIsForTeam).DoForEach(dfe => jsonMessages.Add(new ChatMessageForJson(dfe.EmpfängerPersonOid, dfe.SenderPersonOid, dfe.IsDelivered, dfe.IstGelesen, dfe.TeamOid, dfe.ChatText, dfe.Uhrzeit, dfe.Oid, dfe.InsTs)));
|
||||
|
||||
//messages.DoForEach(d => Debug.WriteLine("ChatText: " + Encoding.UTF8.GetString(d.ChatText) + "; ByteArray: " + d.ChatText.ToString()));
|
||||
|
||||
foreach(var item in messages)
|
||||
{
|
||||
var str = "";
|
||||
item.ChatText.DoForEach(d => str += d.ToString() + ",");
|
||||
|
||||
var abc = MapperFactory.ChatMessagesDC_ChatMessages.MapToNewDC(item);
|
||||
|
||||
Debug.WriteLine("UTF-8: " + Encoding.UTF8.GetString(item.ChatText)
|
||||
+ "\nASCII: " + Encoding.ASCII.GetString(item.ChatText)
|
||||
+ "\nUTF-7: " + Encoding.UTF7.GetString(item.ChatText)
|
||||
+ "\nBigEndianUnicode: " + Encoding.BigEndianUnicode.GetString(item.ChatText)
|
||||
+ "\nUTF-32: " + Encoding.UTF32.GetString(item.ChatText));
|
||||
}
|
||||
|
||||
//jsonMessages.DoForEach(m => Debug.WriteLine("Team: " + (m.TeamOid == null ? "Nein" : m.TeamOid.Value.ToString()) + "; Text: " + m.ChatText));
|
||||
|
||||
return JsonConvert.SerializeObject(jsonMessages);
|
||||
}
|
||||
|
||||
@@ -188,6 +173,12 @@ namespace BeWoPlanerAndroid
|
||||
return JsonConvert.SerializeObject(obj, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new ShouldSerializeContractResolver(), ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
|
||||
}
|
||||
|
||||
[WebMethod(EnableSession = true)]
|
||||
public string KeepAlive()
|
||||
{
|
||||
return "lebt";
|
||||
}
|
||||
|
||||
public class ChatPerson
|
||||
{
|
||||
public long Oid { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user