Beispiel #1
0
        private DArray GetArray(IEnumerable <object> arrayObject, Type arrayType, int depth)
        {
            var array = new DArray();

            object[] list = arrayObject.ToArray();
            string   type = arrayType.Name;

            array.TypeHeader = $"{type} ({list.Length} items)";

            foreach (var item in list)
            {
                DObject arrayItem = GetDObject(item, depth);
                array.Add(arrayItem);

                if (arrayItem is DComplex complex)
                {
                    array.AddColumns(complex.Properties.Select(p => p.Name));
                }
            }

            return(array);
        }
Beispiel #2
0
 public void AddProperty(string name, DObject value)
 {
     _properties.Add(new DProperty(name, value));
 }
Beispiel #3
0
 public void Add(DObject item)
 {
     _items.Add(item);
 }