Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddNew() [1/2]

virtual DataRowView System.Data.DataView.AddNew ( )
inlinevirtualinherited

Implements System.ComponentModel.IBindingList.

Reimplemented in System.Data.RelatedView.

Definition at line 544 of file DataView.cs.

545 {
546 long scopeId = DataCommonEventSource.Log.EnterScope("<ds.DataView.AddNew|API> {0}", ObjectID);
547 try
548 {
549 CheckOpen();
550 if (!AllowNew)
551 {
552 throw ExceptionBuilder.AddNewNotAllowNull();
553 }
554 if (_addNewRow != null)
555 {
556 _rowViewCache[_addNewRow].EndEdit();
557 }
559 DataRowView dataRowView = new DataRowView(this, _addNewRow);
562 return dataRowView;
563 }
564 finally
565 {
566 DataCommonEventSource.Log.ExitScope(scopeId);
567 }
568 }
void Add(TKey key, TValue value)
virtual void OnListChanged(ListChangedEventArgs e)
Definition DataView.cs:1209
Dictionary< DataRow, DataRowView > _rowViewCache
Definition DataView.cs:102
int IList. IndexOf(object value)
Definition DataView.cs:829

References System.Data.DataView._addNewRow, System.Data.DataView._rowViewCache, System.Data.DataView._table, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Data.ExceptionBuilder.AddNewNotAllowNull(), System.Data.DataView.AllowNew, System.Data.DataView.CheckOpen(), System.Data.DataView.IndexOf(), System.Data.DataCommonEventSource.Log, System.Data.DataTable.NewRow(), System.Data.DataView.ObjectID, and System.Data.DataView.OnListChanged().

Referenced by System.Data.DataView.Add(), and System.Data.DataView.AddNew().