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

◆ Validate()

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

Definition at line 369 of file DataTableMappingCollection.cs.

370 {
371 if (value == null)
372 {
373 throw ADP.TablesAddNullAttempt("value");
374 }
375 if (value.Parent != null)
376 {
377 if (this != value.Parent)
378 {
379 throw ADP.TablesIsNotParent(this);
380 }
381 if (index != IndexOf(value))
382 {
383 throw ADP.TablesIsParent(this);
384 }
385 }
386 string sourceTable = value.SourceTable;
387 if (string.IsNullOrEmpty(sourceTable))
388 {
389 index = 1;
390 do
391 {
392 sourceTable = "SourceTable" + index.ToString(CultureInfo.InvariantCulture);
393 index++;
394 }
395 while (-1 != IndexOf(sourceTable));
396 value.SourceTable = sourceTable;
397 }
398 else
399 {
401 }
402 }
static CultureInfo InvariantCulture

References System.index, System.Data.Common.DataTableMappingCollection.IndexOf(), System.Globalization.CultureInfo.InvariantCulture, System.Data.Common.ADP.TablesAddNullAttempt(), System.Data.Common.ADP.TablesIsNotParent(), System.Data.Common.ADP.TablesIsParent(), System.Data.Common.DataTableMappingCollection.ValidateSourceTable(), and System.value.

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