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

            // Set non-required readonly properties with defaultValue
            this.Type = "BuildingPropertiesAbridged";
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BuildingPropertiesAbridged" /> class.
        /// </summary>
        /// <param name="energy">energy.</param>
        public BuildingPropertiesAbridged
        (
            // Required parameters
            BuildingEnergyPropertiesAbridged energy = default // Optional parameters
        ) : base()                                            // BaseClass
        {
            this.Energy = energy;

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

            // check if object is valid
            if (this.GetType() == typeof(BuildingPropertiesAbridged))
            {
                this.IsValid(throwException: true);
            }
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BuildingPropertiesAbridged" /> class.
 /// </summary>
 /// <param name="type">type (default to &quot;BuildingPropertiesAbridged&quot;).</param>
 /// <param name="energy">energy.</param>
 public BuildingPropertiesAbridged(string type = "BuildingPropertiesAbridged", BuildingEnergyPropertiesAbridged energy = default)
 {
     // use default value if no "type" provided
     if (type == null)
     {
         this.Type = "BuildingPropertiesAbridged";
     }
     else
     {
         this.Type = type;
     }
     this.Energy = energy;
 }