示例#1
0
 void TestOfflineManager()
 {
     OfflineMessageManager manager = new OfflineMessageManager();
     manager.PutChatMessage("test","admin", new Message[]{
         new Message()
         {
             From="*****@*****.**",
             To="*****@*****.**",
             Id=DateTime.Now.Ticks+"|"+Guid.NewGuid().ToString(),
             Body="test message at "+ DateTime.Now.ToString()
         },
         new Message()
         {
             From="*****@*****.**",
             To="*****@*****.**",
             Id=DateTime.Now.Ticks+"|"+Guid.NewGuid().ToString(),
             Body="test message1 at "+ DateTime.Now.ToString()
         }
     });
     var msgs = manager.GetChatMessage("*****@*****.**", true);
 }
示例#2
0
        void TestOfflineManager()
        {
            OfflineMessageManager manager = new OfflineMessageManager();

            manager.PutChatMessage("test", "admin", new Message[] {
                new Message()
                {
                    From = "*****@*****.**",
                    To   = "*****@*****.**",
                    Id   = DateTime.Now.Ticks + "|" + Guid.NewGuid().ToString(),
                    Body = "test message at " + DateTime.Now.ToString()
                },
                new Message()
                {
                    From = "*****@*****.**",
                    To   = "*****@*****.**",
                    Id   = DateTime.Now.Ticks + "|" + Guid.NewGuid().ToString(),
                    Body = "test message1 at " + DateTime.Now.ToString()
                }
            });
            var msgs = manager.GetChatMessage("*****@*****.**", true);
        }