public void ProcessRequest(HttpContext context) { try { Hashtable recivedata = GetRequestValue(context); string recievdData = JsonConvert.SerializeObject(recivedata); SPTestRecievedWrapper spTestRecievedWrapper = new SPTestRecievedWrapper(); spTestRecievedWrapper.ChannelID = null; spTestRecievedWrapper.ClientID = null; spTestRecievedWrapper.RecievedSendUrl = Path.GetFileName(context.Request.PhysicalPath); spTestRecievedWrapper.RecievedDate = DateTime.Now; spTestRecievedWrapper.RecievedContent = recievdData; spTestRecievedWrapper.RecievedIP = GetRealIP(); SPTestRecievedWrapper.Save(spTestRecievedWrapper); context.Response.Write("ok"); } catch (Exception e) { logger.Error("Process Request Error:", e); return; } }
public void FromWrapper(SPTestRecievedWrapper wrapper) { this.Id = wrapper.Id; this.RecievedContent = wrapper.RecievedContent; this.RecievedDate = wrapper.RecievedDate; this.RecievedIP = wrapper.RecievedIP; this.RecievedSendUrl = wrapper.RecievedSendUrl; this.ChannelID = wrapper.ChannelID; this.ClientID = wrapper.ClientID; }
public SPTestRecievedWrapper ToWrapper() { SPTestRecievedWrapper wrapper = new SPTestRecievedWrapper(); wrapper.Id = this.Id; wrapper.RecievedContent = this.RecievedContent; wrapper.RecievedDate = this.RecievedDate; wrapper.RecievedIP = this.RecievedIP; wrapper.RecievedSendUrl = this.RecievedSendUrl; wrapper.ChannelID = this.ChannelID; wrapper.ClientID = this.ClientID; return(wrapper); }