Exemple #1
0
        public TestDataUniverse(IUniverse universe)
        {
            _universe = universe;
            var planets = _universe.Planets();
            var mercury = planets.Create("Mercury");
            var venus   = planets.Create("Venus");
            var earth   = planets.Create("Earth");

            planets.Create("Mars");
            planets.Create("Jupiter");
            planets.Create("Saturn");
            planets.Create("Uranus");

            var properties = _universe.Properties();
            var atmosphere = properties.Create("Atmosphere");
            var water      = properties.Create("Water");
            var solid      = properties.Create("Solid");
            var radiation  = properties.Create("Radiation");
            var hot        = properties.Create("Hot");
            var cold       = properties.Create("Cold");
            var ice        = properties.Create("Ice");

            earth.Properties().Add(atmosphere);
            earth.Properties().Add(water);

            venus.Properties().Add(hot);
            venus.Properties().Add(radiation);

            mercury.Properties().Add(solid);
            mercury.Properties().Add(ice);
            mercury.Properties().Add(cold);
        }
        public ListPropertiesViewModel(IUniverse universe)
        {
            _properties = new AsyncProperties(universe.Properties());
            _properties.NewPropertyEvent += (sender, args) => _addProperty(args.Property);

            CreateProperty = new CreateProperty(_properties);

            _loadProperties();
        }
Exemple #3
0
 public IProperties Properties()
 {
     return(_universe.Properties());
 }