Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VQuerySchedule"/> class.
 /// </summary>
 /// <param name="serverConnections">The <see cref="VServerConnections"/> handling the <see cref="NpgsqlConnection"/> of the schedule.</param>
 /// <param name="serverErrors">The <see cref="VServerErrors"/> handling the <see cref="VServerError"/> of the schedule.</param>
 public VQuerySchedule(VServerConnections serverConnections, VServerErrors serverErrors)
 {
     this.serverConnections   = serverConnections ?? throw new ArgumentNullException(nameof(serverConnections));
     this.serverErrors        = serverErrors ?? throw new ArgumentNullException(nameof(serverErrors));
     this.Queries             = new List <VQuery>();
     this.lastSavedQueryIndex = 0;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VContentText"/> class.
        /// </summary>
        /// <param name="querySchedule">The <see cref="VQuerySchedule"/> handling the <see cref="VQuery"/> of the <see cref="VContentText"/>.</param>
        /// <param name="serverConnections">The <see cref="VServerConnections"/> handling the <see cref="NpgsqlConnection"/> of the <see cref="VContentText"/>.</param>
        /// <param name="id">The identifier of the <see cref="VContentText"/>.</param>
        public VContentText(VQuerySchedule querySchedule, VServerConnections serverConnections, int id)
        {
            this.querySchedule     = querySchedule ?? throw new ArgumentNullException(nameof(querySchedule));
            this.serverConnections = serverConnections ?? throw new ArgumentNullException(nameof(serverConnections));
            this.ID = id;

            if (this.ID == -1)
            {
                this.querySchedule.AddQuery(new VQuery(this.GenerateInsertionQuery, this.AssignId, Resources.ErrorInsertContentText));
            }
        }