Esempio n. 1
0
        /// <inheritdoc />
        public override void SetValue(ILogFileColumn column, object value)
        {
            if (!LogFileColumn.IsAssignableFrom(column, value))
            {
                throw new ArgumentException();
            }

            if (!_columns.Contains(column))
            {
                _columns.Add(column);
                _values.Add(column, value);
            }
            else
            {
                _values[column] = value;
            }
        }
Esempio n. 2
0
        /// <inheritdoc />
        public override void SetValue(ILogFileColumn column, object value)
        {
            if (!LogFileColumn.IsAssignableFrom(column, value))
            {
                throw new ArgumentException(string.Format("The value '{0}' of type '{1}' cannot be assigned to column '{2}' of type '{3}'",
                                                          value, value?.GetType(),
                                                          column, column.DataType));
            }

            if (!_columns.Contains(column))
            {
                _columns.Add(column);
                _values.Add(column, value);
            }
            else
            {
                _values[column] = value;
            }
        }