public void Send() { var message = (NPRPCMessage <T>)NPMessageFactory.CreateMessage(typeof(T)); message.Message = Message; message.ID = ID; var buffer = message.Serialize(); SourceClient.Send(buffer); }
public void Process() { try { var message = NPMessageFactory.CreateMessage(Type); Log.Debug("Dispatching a " + message.GetType().Name); message.ID = ID; message.Deserialize(Buffer); message.Process(_client); } catch (Exception e) { Log.Error(e.ToString()); } }