Exemple #1
0
        /// <summary>
        /// Initializes this entity from a table row and
        /// a database.
        /// </summary>
        /// <param name="row">The row that will be used to initialize this entity</param>
        /// <param name="database">The database that will be used to initialize this entity</param>
        public InpEntity(IInpTableRow row, IInpDatabase database) : this()
        {
            // Check if the argument is null
            _ = row ?? throw new ArgumentNullException(nameof(row));
            _ = database ?? throw new ArgumentNullException(nameof(database));

            // Check to see if the row has a name
            // and if it does set it
            if (row.Values.Count > 1)
            {
                Name = row[0];
            }

            // Set the database for the
            Database = database;
        }
 /// <summary>
 /// Internal Constructor for building the <see cref="ConduitLengtheningStepOption"/> from
 /// and <see cref="IInpTableRow"/> and add it to the <see cref="IInpDatabase"/> supplied.
 /// </summary>
 /// <param name="row">The row that will be used to build the option</param>
 /// <param name="database">The database that the option belongs to</param>
 internal ConduitLengtheningStepOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
 }
Exemple #3
0
 /// <summary>
 /// Constructor that takes in an <see cref="IInpTableRow"/> and an <see cref="IInpDatabase"/>.
 /// The value of the Option will be constructed from the <see cref="IInpTableRow"/> that is passed
 /// </summary>
 /// <param name="row">The row that will construct the value for this option</param>
 /// <param name="database">The database that this option belongs to</param>
 internal ReportStartDateTimeOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
 }
Exemple #4
0
 public InpStringWriter(IInpDatabase database)
 {
     _database = database;
 }
Exemple #5
0
 /// <summary>
 /// Constructor the class that accepts an <see cref="IInpTableRow"/>
 /// and a <see cref="IInpDatabase"/>.
 /// </summary>
 /// <param name="row">The row that the option will be created from</param>
 /// <param name="database">The database that the option will belong to</param>
 internal EndDateTimeOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
     // Everything is constructed in the base class
 }
Exemple #6
0
 /// <summary>
 /// Constructor that sets the value from the <paramref name="row"/> data
 /// and sets the database that the option belongs to
 /// </summary>
 /// <param name="row"></param>
 /// <param name="database"></param>
 internal InpDoubleOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
     Value = ParseRow(row);
 }
Exemple #7
0
 /// <summary>
 /// Build the option from an <see cref="IInpTableRow"/> and an <see cref="IInpDatabase"/>
 /// </summary>
 /// <param name="row">The row that the <see cref="InpOption{T}"/> will be built from</param>
 /// <param name="database">The database that the option belongs to</param>
 internal InpBoolOption(IInpTableRow row, IInpDatabase database) : base(row, database) => Value = ParseRow(row);
 /// <summary>
 /// Internal Constructor that builds the option from an <see cref="IInpTableRow"/>
 /// and places the option into the <see cref="IInpDatabase"/>
 /// </summary>
 /// <param name="row">The row that will be used to build the option</param>
 /// <param name="database">The database that the option belongs to</param>
 internal ControlRuleStepOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
 }
Exemple #9
0
 /// <summary>
 /// Initializes the entities that this table is associated with
 /// </summary>
 /// <returns>Returns: an <see cref="IInpEntity"/> that is initialized with this row
 /// and the database</returns>
 private IInpEntity?InitializeEntity(IInpDatabase database) => InpTable.Name switch
 {
 /// <summary>
 /// Constructor that accepts a <see cref="IInpTableRow"/> and a <see cref="IInpDatabase"/>
 /// </summary>
 /// <param name="row">The row that will be used to construct the option</param>
 /// <param name="database">The database that the option belongs to</param>
 internal AllowPondingOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
 }
Exemple #11
0
 /// <summary>
 /// Convert this table row to an <see cref="IInpEntity"/>. This method will using the
 /// constructor of an entity which has the following signature <see cref="InpEntity(IInpTableRow, IInpDatabase)"/>
 /// </summary>
 /// <returns>Returns: An <see cref="IInpEntity"/> that is created from this table data</returns>
 public IInpEntity ToInpEntity(IInpDatabase database) => InitializeEntity(database) ?? new InpEntity();
Exemple #12
0
 /// <summary>
 /// Constructor that accepts a <see cref="IInpTableRow"/> and an <see cref="IInpDatabase"/>
 /// to build the object
 /// </summary>
 /// <param name="row">The row that will be used to construct the value</param>
 /// <param name="database">The database that the date time belongs to</param>
 internal InpDateTimeOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
     // Convert the row into a DateTime and
     // store it in the value property
     Value = ParseRow(row);
 }
Exemple #13
0
 /// <summary>
 /// The internal constructor that will create the option from a <see cref="IInpTableRow"/>
 /// and add this option to the <see cref="IInpDatabase"/>
 /// </summary>
 /// <param name="row">The row that will be used to create the option</param>
 /// <param name="database">The database that this option belongs to</param>
 internal DryDaysOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
     Value = ParseRow(row);
 }
 /// <summary>
 /// Constructor that accepts an <see cref="IInpTableRow"/>
 ///  and an <see cref="IInpDatabase"/>
 /// </summary>
 /// <param name="row">The row that will be used to construct the value</param>
 /// <param name="database">The database that the option belongs to</param>
 internal DryWeatherStepOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
 }
Exemple #15
0
 /// <summary>
 /// Constructor that passes the arguments to the base class
 /// </summary>
 /// <param name="row">the row that will be used to construct the option</param>
 /// <param name="database">the database that this option belongs to</param>
 internal InpOption(IInpTableRow row, IInpDatabase database) : base(row, database)
 {
     Value = default;
 }