private void LoadMessageCenter(string name) { Type type = null; if (!string.IsNullOrEmpty(name)) { type = Type.GetType(name); if (type != null) { if (type.GetInterface("EC.IMessageCenter") == null) { "{0} type not is message center".Log4Error(name); type = null; } } else { "{0} type message center notfound".Log4Error(name); } } if (type == null) { MessageCenter = new Remoting.MessageCenter(); } else { MessageCenter = (IMessageCenter)Activator.CreateInstance(type); } }
private void initDefault() { PacketMaxsize = 1024 * 1024 * 50; Port = 10034; Http = "http://localhost:10035/"; PacketAnalyzer = new Implement.ProtobufPacket(); MessageCenter = new Remoting.MessageCenter(); }