private bool ProcessClientClassType(Type type) { if (_EntityClasses.ContainsKey(type)) { return(true); } else if (type.UnderlyingSystemType == typeof(Object)) { return(true); } EntityMetaAttribute meta = null; foreach (var att in Attribute.GetCustomAttributes(type)) { if (att.GetType() != typeof(EntityMetaAttribute)) { continue; } meta = att as EntityMetaAttribute; break; } ClientClass cc = null; if (meta != null) { cc = new ClientClass(type.Name, meta); } else { cc = new ClientClass(type.Name); } if (!ProcessClientProps(type, cc)) { return(false); } _EntityClasses.Add(type, cc); return(ProcessClientClassType(type.BaseType)); }
public ClientClass(string className, EntityMetaAttribute meta) { if (meta != null && !String.IsNullOrEmpty(meta.ClassName)) { Name = meta.ClassName; } else { Name = className; } if (meta != null && !String.IsNullOrEmpty(meta.SentTableName)) { RecvNetTableName = meta.SentTableName; } else { RecvNetTableName = className; } }