You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Unable to render {include} The included page could not be found.

In the first version of DelftShell the following approach was implemented to manage different data of the project and models:

public enum DataItemRole { Input, Output, InputOutput, Debug }

public interface IDataItem
{
   int Id { get; set; }

   string Name { get; set; }
   string Description { get; set; }

   DataItemRole { get; set; }

   object Value { get; set; }
   Type ValueType { get; set; }

   object Owner { get; set; }

   IDataItem Parent { get; set; }
   IDataItem[] Children { get; }

   bool CanLinkTo(IDataItem child);

   event EventHandler Changed;
}

This interface is used to wrap various data items (stored in the Value property) and to allow them to be linked with each other, identify them, name, etc.

However during implementation of HABITAT and Verkenner the following was identified:

  • We had to change interface to abstract class in order to XML serialize it
  • As result attributes had to be added to each property which made it less readable.
  • All data objects were forced to implement IDataItem which made them a bit more complicated then they should be.

In order to improve architecture the following was proposed:

...

  • No labels