public ZenArchiveObject AddMainObject(string className)
        {
            var zenArchiveObject = new ZenArchiveObject("%", className, 0);

            objects.Add(zenArchiveObject);

            return(zenArchiveObject);
        }
        public ZenArchiveObject AddMainObject(string name, string className, int version)
        {
            var zenArchiveObject = new ZenArchiveObject(name, className, version);

            objects.Add(zenArchiveObject);

            return(zenArchiveObject);
        }
Beispiel #3
0
        public ZenArchiveObject AddChild(string className)
        {
            var zenArchiveObject = new ZenArchiveObject("%", className, 0);

            Childs.Add(zenArchiveObject);

            return(zenArchiveObject);
        }
Beispiel #4
0
        public ZenArchiveObject AddChild(string name, string className, int version)
        {
            var zenArchiveObject = new ZenArchiveObject(name, className, version);

            Childs.Add(zenArchiveObject);

            return(zenArchiveObject);
        }
        private int writeObject(StreamWriter sw, ZenArchiveObject obj, int id, string indent = "")
        {
            sw.WriteLine(indent + $"[{obj.Header.Name} {obj.Header.ClassName} {obj.Header.Version} {id}]");

            indent += "\t";

            foreach (var property in obj.Properties)
            {
                sw.WriteLine(indent + property.ToString().TrimEnd());
            }

            foreach (var childObject in obj.Childs)
            {
                id = writeObject(sw, childObject, ++id, indent);
            }

            sw.WriteLine(indent.Remove(indent.Length - 1) + "[]");

            return(id);
        }
        public ZenArchiveObject AddMainObject(ZenArchiveObject zenArchiveObject)
        {
            objects.Add(zenArchiveObject);

            return(zenArchiveObject);
        }
Beispiel #7
0
        public ZenArchiveObject AddChild(ZenArchiveObject zenArchiveObject)
        {
            Childs.Add(zenArchiveObject);

            return(zenArchiveObject);
        }