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

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

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

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