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

◆ SchemaMapping()

System.Data.ProviderBase.SchemaMapping.SchemaMapping ( DataAdapter adapter,
DataSet dataset,
DataTable datatable,
DataReaderContainer dataReader,
bool keyInfo,
SchemaType schemaType,
string sourceTableName,
bool gettingData,
DataColumn parentChapterColumn,
object parentChapterValue )
inlinepackage

Definition at line 50 of file SchemaMapping.cs.

51 {
54 _adapter = adapter;
56 if (keyInfo)
57 {
58 _schemaTable = dataReader.GetSchemaTable();
59 }
61 {
63 }
64 else if (adapter.AcceptChangesDuringFill)
65 {
67 }
68 else
69 {
71 }
72 MissingMappingAction missingMappingAction;
73 MissingSchemaAction schemaAction;
74 if (SchemaType.Mapped == schemaType)
75 {
78 if (!string.IsNullOrEmpty(sourceTableName))
79 {
81 }
82 else if (_dataTable != null)
83 {
85 if (-1 != num)
86 {
88 }
89 else
90 {
92 {
97 };
98 }
99 }
100 }
101 else
102 {
103 if (SchemaType.Source != schemaType)
104 {
105 throw ADP.InvalidSchemaType(schemaType);
106 }
107 missingMappingAction = MissingMappingAction.Passthrough;
108 schemaAction = MissingSchemaAction.Add;
109 if (!string.IsNullOrEmpty(sourceTableName))
110 {
112 }
113 else if (_dataTable != null)
114 {
116 if (-1 != num2)
117 {
119 }
120 else
121 {
123 }
124 }
125 }
126 if (_tableMapping == null)
127 {
128 return;
129 }
130 if (_dataTable == null)
131 {
133 }
134 if (_dataTable != null)
135 {
137 if (_schemaTable == null)
138 {
140 }
141 else
142 {
144 }
145 }
146 }
void Add(TKey key, TValue value)
static ArgumentOutOfRangeException InvalidSchemaType(SchemaType value)
Definition ADP.cs:144
static InvalidOperationException MissingTableMappingDestination(string dstTable)
Definition ADP.cs:228
static ArgumentOutOfRangeException InvalidMissingMappingAction(MissingMappingAction value)
Definition ADP.cs:129
MissingSchemaAction MissingSchemaAction
virtual bool ShouldSerializeFillLoadOption()
MissingMappingAction MissingMappingAction
DataTableMappingCollection TableMappings
DataTableMapping GetTableMappingBySchemaAction(string sourceTableName, string dataSetTableName, MissingMappingAction mappingAction)
int IndexOfDataSetTable(string dataSetTable)
static ? DataTableMapping GetTableMappingBySchemaAction(DataTableMappingCollection? tableMappings, string sourceTable, string dataSetTable, MissingMappingAction mappingAction)
DataTable? GetDataTableBySchemaAction(DataSet dataSet, MissingSchemaAction schemaAction)
static string[] GenerateFieldNames(DataReaderContainer dataReader)
readonly DataReaderContainer _dataReader
readonly DataTableMapping _tableMapping
object[] SetupSchemaWithKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, bool gettingData, DataColumn parentChapterColumn, object chapterValue)
object[] SetupSchemaWithoutKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, bool gettingData, DataColumn parentChapterColumn, object chapterValue)

References System.Data.ProviderBase.SchemaMapping._adapter, System.Data.ProviderBase.SchemaMapping._dataReader, System.Data.ProviderBase.SchemaMapping._dataSet, System.Data.ProviderBase.SchemaMapping._dataTable, System.Data.ProviderBase.SchemaMapping._fieldNames, System.Data.ProviderBase.SchemaMapping._loadOption, System.Data.ProviderBase.SchemaMapping._readerDataValues, System.Data.ProviderBase.SchemaMapping._schemaTable, System.Data.ProviderBase.SchemaMapping._tableMapping, System.Data.Common.DataAdapter.AcceptChangesDuringFill, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, System.Data.Common.DataAdapter.FillLoadOption, System.Data.ProviderBase.SchemaMapping.GenerateFieldNames(), System.Data.Common.DataTableMapping.GetDataTableBySchemaAction(), System.Data.Common.DataTableMappingCollection.GetTableMappingBySchemaAction(), System.Data.Common.DataAdapter.GetTableMappingBySchemaAction(), System.Data.Common.DataAdapter.IndexOfDataSetTable(), System.Data.Common.ADP.InvalidMissingMappingAction(), System.Data.Common.ADP.InvalidSchemaType(), System.Data.Common.DataAdapter.MissingMappingAction, System.Data.Common.DataAdapter.MissingSchemaAction, System.Data.Common.ADP.MissingTableMappingDestination(), System.Data.ProviderBase.SchemaMapping.SetupSchemaWithKeyInfo(), System.Data.ProviderBase.SchemaMapping.SetupSchemaWithoutKeyInfo(), System.Data.Common.DataAdapter.ShouldSerializeFillLoadOption(), System.Data.Common.DataAdapter.TableMappings, and System.Data.DataTable.TableName.