private RootNode Generate(RootType type) { if (type.Type == null) { return(null); } if (registeredTypes.ContainsKey(type)) { return(registeredTypes[type]); } RootType[] referencedTypes; RootNode root = registeredTypes[type] = Generate(type, out referencedTypes); if (referencedTypes != null) { for (int i = 0; i < referencedTypes.Length; i++) { Generate(referencedTypes[i]); } } return(root); }
private RootNode Generate(RootType type, out RootType[] referencedTypes) { registeredTypes.Add(type, null); HashSet <RootType> referTypes = new HashSet <RootType>(); RootNode root = new RootNode(type); root.Generate(referTypes); referencedTypes = referTypes.ToArray(); return(root); }
public RootNode(RootType type) : base(type.Type) { Root = type; }
public RootNode(Type type) : base(type) { Root = new RootType(type); }
public WritePartNode(RootType type, List <FieldInfo> fields) : base(type.Type) { this.fields = fields; rootType = type; }
public ReadPartNode(RootType type, List <FieldInfo> fields) : base(type.Type) { this.fields = fields; rootType = type; CreateNew = type.Type.IsClass && type.Type.GetConstructor(new Type[0]) != null; }
public TypeNode(RootType type) : base(type.Type) { rootType = type; customAttribute = TypeUtil.GetCustomAttribute <CustomSerialierAttribute>(type.Type, true); }
public TypeNode(Type type, CustomSerialierAttribute customAttr = null) : base(type) { rootType = new RootType(type, XmlUtil.IsPolymorphicClass(type)); customAttribute = customAttr ?? TypeUtil.GetCustomAttribute <CustomSerialierAttribute>(type, true); }