예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FacePropertiesAbridged" /> class.
        /// </summary>
        /// <param name="energy">energy.</param>
        /// <param name="radiance">radiance.</param>
        public FacePropertiesAbridged
        (
            // Required parameters
            FaceEnergyPropertiesAbridged energy = default, FaceRadiancePropertiesAbridged radiance = default // Optional parameters
        ) : base()                                                                                           // BaseClass
        {
            this.Energy   = energy;
            this.Radiance = radiance;

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

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

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