Esempio n. 1
0
        /// <summary>
        /// Create new version detail information.
        /// </summary>
        /// <param name="VersionId">The version identification.</param>
        /// <param name="Endpoints">The endpoints of this version.</param>
        public VersionDetail(Version_Id VersionId,
                             IEnumerable <VersionEndpoint> Endpoints)
        {
            if (VersionId.IsNullOrEmpty)
            {
                throw new ArgumentNullException(nameof(VersionId), "The given version identification must not be null or empty!");
            }

            if (!Endpoints.SafeAny())
            {
                throw new ArgumentNullException(nameof(Endpoints), "The given version endpoints must not be null or empty!");
            }


            this.VersionId = VersionId;
            this.Endpoints = Endpoints?.Distinct();
        }
        /// <summary>
        /// Create a new version information information.
        /// </summary>
        /// <param name="Id">The version information identification.</param>
        /// <param name="URL">The URL of the version information.</param>
        public VersionInformation(Version_Id Id,
                                  URL URL)
        {
            if (Id.IsNullOrEmpty)
            {
                throw new ArgumentNullException(nameof(Id), "The given version information identification must not be null or empty!");
            }

            if (URL.IsNullOrEmpty)
            {
                throw new ArgumentNullException(nameof(URL), "The given version information URL must not be null or empty!");
            }


            this.Id  = Id;
            this.URL = URL;
        }