Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Room2DPropertiesAbridged" /> class.
        /// </summary>
        /// <param name="energy">energy.</param>
        public Room2DPropertiesAbridged
        (
            // Required parameters
            Room2DEnergyPropertiesAbridged energy = default // Optional parameters
        ) : base()                                          // BaseClass
        {
            this.Energy = energy;

            // Set non-required readonly properties with defaultValue
            this.Type = "Room2DPropertiesAbridged";
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Room2DPropertiesAbridged" /> class.
 /// </summary>
 /// <param name="type">type (default to &quot;Room2DPropertiesAbridged&quot;).</param>
 /// <param name="energy">energy.</param>
 public Room2DPropertiesAbridged(string type = "Room2DPropertiesAbridged", Room2DEnergyPropertiesAbridged energy = default)
 {
     // use default value if no "type" provided
     if (type == null)
     {
         this.Type = "Room2DPropertiesAbridged";
     }
     else
     {
         this.Type = type;
     }
     this.Energy = energy;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="Room2DPropertiesAbridged" /> class.
        /// </summary>
        /// <param name="energy">energy.</param>
        public Room2DPropertiesAbridged
        (
            // Required parameters
            Room2DEnergyPropertiesAbridged energy = default // Optional parameters
        ) : base()                                          // BaseClass
        {
            this.Energy = energy;

            // Set non-required readonly properties with defaultValue
            this.Type = "Room2DPropertiesAbridged";

            // check if object is valid
            if (this.GetType() == typeof(Room2DPropertiesAbridged))
            {
                this.IsValid(throwException: true);
            }
        }