public static bool AddProto(string route, ProtoType type, Type uldt, Type dldt) { var proto = new Proto(route, type, uldt != null ? uldt.FullName : null, dldt != null ? dldt.FullName : null); var exist = Protocol.Instance.GetProto(proto.route); if (exist == null) { return(Protocol.Instance.AddProto(GenProtoCode(route), proto)); } if (proto.Equals(exist)) { return(true); } Logger.Error("proto route conflict! {0}->{1}", proto, exist); return(false); }