diff -r 4a08e1b7ba64 -r 82e87f4956ea SharpLibEar/Object.cs --- a/SharpLibEar/Object.cs Wed Aug 31 17:28:30 2016 +0200 +++ b/SharpLibEar/Object.cs Wed Aug 31 20:20:32 2016 +0200 @@ -19,6 +19,22 @@ { private bool iConstructed = false; + [DataMember] + public List Objects = new List(); + + /// + /// + [DataMember] + [AttributeObjectProperty + ( + Id = "Object.Name", + Name = "Name", + Description = "Given object name." + ) + ] + public string Name { get; set; } = ""; + + protected Object() { Construct(); @@ -29,11 +45,18 @@ /// public void Construct() { + //Construct ourselves first if (!iConstructed) { DoConstruct(); iConstructed = true; } + + //Then construct our children + foreach (Object o in Objects) + { + o.Construct(); + } } /// @@ -41,10 +64,19 @@ /// protected virtual void DoConstruct() { + //Make sure our name is not null + if (Name == null) + { + Name = ""; + } + // Makes sure our objects are not null + if (Objects == null) + { + Objects = new List(); + } } - public enum State { Rest=0,