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

◆ Validate()

void System.Data.Common.DataColumnMappingCollection.Validate ( int index,
[NotNull] DataColumnMapping value )
inlineprivate

Definition at line 371 of file DataColumnMappingCollection.cs.

372 {
373 if (value == null)
374 {
375 throw ADP.ColumnsAddNullAttempt("value");
376 }
377 if (value.Parent != null)
378 {
379 if (this != value.Parent)
380 {
381 throw ADP.ColumnsIsNotParent(this);
382 }
383 if (index != IndexOf(value))
384 {
385 throw ADP.ColumnsIsParent(this);
386 }
387 }
388 string sourceColumn = value.SourceColumn;
389 if (string.IsNullOrEmpty(sourceColumn))
390 {
391 index = 1;
392 do
393 {
394 sourceColumn = "SourceColumn" + index.ToString(CultureInfo.InvariantCulture);
395 index++;
396 }
397 while (-1 != IndexOf(sourceColumn));
398 value.SourceColumn = sourceColumn;
399 }
400 else
401 {
403 }
404 }
static CultureInfo InvariantCulture

References System.Data.Common.ADP.ColumnsAddNullAttempt(), System.Data.Common.ADP.ColumnsIsNotParent(), System.Data.Common.ADP.ColumnsIsParent(), System.index, System.Data.Common.DataColumnMappingCollection.IndexOf(), System.Globalization.CultureInfo.InvariantCulture, System.Data.Common.DataColumnMappingCollection.ValidateSourceColumn(), and System.value.

Referenced by System.Data.Common.DataColumnMappingCollection.AddWithoutEvents(), System.Data.Common.DataColumnMappingCollection.Insert(), and System.Data.Common.DataColumnMappingCollection.Replace().