예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PropertyInterval" /> class.
        /// </summary>
        /// <param name="value">value (required).</param>
        /// <param name="effectiveRange">effectiveRange (required).</param>
        /// <param name="asAtRange">asAtRange (required).</param>
        /// <param name="status">Indicates whether the value is part of the prevailing effective date timeline for the requested asAt date, or whether it has been superseded by correctional activity (required).</param>
        public PropertyInterval(PropertyValue value = default(PropertyValue), DateRange effectiveRange = default(DateRange), DateRange asAtRange = default(DateRange), string status = default(string))
        {
            // to ensure "value" is required (not null)
            if (value == null)
            {
                throw new InvalidDataException("value is a required property for PropertyInterval and cannot be null");
            }
            else
            {
                this.Value = value;
            }

            // to ensure "effectiveRange" is required (not null)
            if (effectiveRange == null)
            {
                throw new InvalidDataException("effectiveRange is a required property for PropertyInterval and cannot be null");
            }
            else
            {
                this.EffectiveRange = effectiveRange;
            }

            // to ensure "asAtRange" is required (not null)
            if (asAtRange == null)
            {
                throw new InvalidDataException("asAtRange is a required property for PropertyInterval and cannot be null");
            }
            else
            {
                this.AsAtRange = asAtRange;
            }

            // to ensure "status" is required (not null)
            if (status == null)
            {
                throw new InvalidDataException("status is a required property for PropertyInterval and cannot be null");
            }
            else
            {
                this.Status = status;
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PropertyInterval" /> class.
 /// </summary>
 /// <param name="value">value (required).</param>
 /// <param name="effectiveRange">effectiveRange (required).</param>
 /// <param name="asAtRange">asAtRange (required).</param>
 /// <param name="status">Indicates whether the value is part of the prevailing effective date timeline for the requested asAt date, or whether it has been superseded by correctional activity (required).</param>
 public PropertyInterval(PropertyValue value = default(PropertyValue), DateRange effectiveRange = default(DateRange), DateRange asAtRange = default(DateRange), string status = default(string))
 {
     // to ensure "value" is required (not null)
     this.Value = value ?? throw new ArgumentNullException("value is a required property for PropertyInterval and cannot be null");
     // to ensure "effectiveRange" is required (not null)
     this.EffectiveRange = effectiveRange ?? throw new ArgumentNullException("effectiveRange is a required property for PropertyInterval and cannot be null");
     // to ensure "asAtRange" is required (not null)
     this.AsAtRange = asAtRange ?? throw new ArgumentNullException("asAtRange is a required property for PropertyInterval and cannot be null");
     // to ensure "status" is required (not null)
     this.Status = status ?? throw new ArgumentNullException("status is a required property for PropertyInterval and cannot be null");
 }