Ejemplo n.º 1
0
		static BinaryStreamWriter GetMails_2(object __serviceObj, Session __client, BinaryStreamReader __reader)
		{
			var __timer = TimeCounter.BeginNew();
			IAgentServerImpl __service = (IAgentServerImpl)__serviceObj;
			int __reqId;
			__reader.Read(out __reqId);
		#if (DEBUG || LOG_PROTOCOL)
			Log.Debug("GetMails  reqId: {0}",  __reqId);
		#endif
			var reply = new IAgentServer_GetMailsCallback(__reqId, __client.Connection);
			try
			{
				__service.GetMails(__client, reply);
			}
			catch(ServiceException e)
			{
				reply.Error(e.ErrCode, e.Message);
			}
			catch(Exception e)
			{
				Log.Error("Generic Service Invoke Failed, clientId:{0} error message:{1}\nCall Stack: {2}", __client.ID, e.Message, e.StackTrace);
				reply.Error((int)ServiceErrorCode.Generic, "generic service error.");
			}
			PerfStatistic.AddItem("IAgentServer.GetMails", (int)__timer.End());
			return null;
		}
Ejemplo n.º 2
0
	void IAgentServerImpl.GetMails(Session session, IAgentServer_GetMailsCallback cb)
	{
		var userId = (string)session.UserData;
		_mailServer.Call.GetMails(userId, mails => cb.Reply(mails));
	}