Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new instance of <see cref="EntityTermEnd"/>.
        /// </summary>
        /// <param name="entity">Entity.</param>
        /// <param name="councilTerm">Council term.</param>
        /// <param name="officialTerm">Official term.</param>
        /// <exception cref="ArgumentNullException"><paramref name="entity"/> is <c>null</c>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="councilerm"/> and <paramref name="officialTerm"/> are <c>null</c> at same time.</exception>
        /// <remarks><paramref name="councilerm"/> and <paramref name="officialTerm"/> can be <c>null</c>, but not both.</remarks>
        public EntityTermEnd(Entity entity, CouncilTerm councilTerm, OfficialEntryBase officialTerm)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }
            if ((councilTerm == null) & (officialTerm == null))
            {
                throw new ArgumentException();
            }

            Entity       = entity;
            CouncilTerm  = councilTerm;
            OfficialTerm = officialTerm;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new instance of <see cref="EntityTermEnd"/>.
        /// </summary>
        /// <param name="entity">Entity.</param>
        /// <param name="councilTerm">Council term.</param>
        /// <param name="officialTerm">Official term.</param>
        /// <exception cref="ArgumentNullException"><paramref name="entity"/> is <c>null</c>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="councilerm"/> and <paramref name="officialTerm"/> are <c>null</c> at same time.</exception>
        /// <remarks><paramref name="councilerm"/> and <paramref name="officialTerm"/> can be <c>null</c>, but not both.</remarks>
        public EntityTermEnd(Entity entity, CouncilTerm councilTerm, OfficialEntryBase officialTerm)
        {
            if ( entity == null )
            {
                throw new ArgumentNullException("entity");
            }
            if ( (councilTerm == null) & (officialTerm == null) )
            {
                throw new ArgumentException();
            }

            Entity = entity;
            CouncilTerm = councilTerm;
            OfficialTerm = officialTerm;
        }