Exemplo n.º 1
0
        public virtual Dictionary <string, Dictionary <Dictionary <string, string>, string[]> > PropertiesToDictionary()
        {
            Dictionary <Dictionary <string, string>, string[]> properties_vehicle = new Dictionary <Dictionary <string, string>, string[]>();
            Dictionary <string, string> modelName = new Dictionary <string, string>();

            modelName.Add("Model Name", m_Model);
            properties_vehicle.Add(modelName, null);

            Dictionary <Dictionary <string, string>, string[]> properties_wheels = new Dictionary <Dictionary <string, string>, string[]>();

            Dictionary <string, string> manuFacturerName = new Dictionary <string, string>();

            manuFacturerName.Add("Manufacturer Name", m_Wheels[0].Manufacturer);

            Dictionary <string, string> currentWhellPressure = new Dictionary <string, string>();

            currentWhellPressure.Add("Current Wheel Air Pressure", String.Format("{0:0.00}", m_Wheels[0].CurrentAirPressure));

            properties_wheels.Add(manuFacturerName, null);
            properties_wheels.Add(currentWhellPressure, null);

            Dictionary <string, Dictionary <Dictionary <string, string>, string[]> > properties = new Dictionary <string, Dictionary <Dictionary <string, string>, string[]> >();

            properties.Add("Vehicle", properties_vehicle);
            properties.Add("Wheels", properties_wheels);
            properties.Add("Engine", m_Engine.PropertiesToDictionary());

            return(properties);
        }