示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DoorPropertiesAbridged" /> class.
        /// </summary>
        /// <param name="energy">energy.</param>
        /// <param name="radiance">radiance.</param>
        public DoorPropertiesAbridged
        (
            // Required parameters
            DoorEnergyPropertiesAbridged energy = default, DoorRadiancePropertiesAbridged radiance = default // Optional parameters
        ) : base()                                                                                           // BaseClass
        {
            this.Energy   = energy;
            this.Radiance = radiance;

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

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

            // check if object is valid, only check for inherited class
            if (this.GetType() == typeof(DoorPropertiesAbridged))
            {
                this.IsValid(throwException: true);
            }
        }