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

◆ ParameterNames()

System.Data.Common.DbCommandBuilder.ParameterNames.ParameterNames ( DbCommandBuilder dbCommandBuilder,
DbSchemaRow[] schemaRows )
inlinepackage

Definition at line 35 of file DbCommandBuilder.cs.

36 {
37 _dbCommandBuilder = dbCommandBuilder;
38 _baseParameterNames = new string[schemaRows.Length];
39 _originalParameterNames = new string[schemaRows.Length];
40 _nullParameterNames = new string[schemaRows.Length];
41 _isMutatedName = new bool[schemaRows.Length];
42 _count = schemaRows.Length;
46 for (int i = 0; i < schemaRows.Length; i++)
47 {
48 DbSchemaRow dbSchemaRow = schemaRows[i];
49 if (dbSchemaRow == null)
50 {
51 continue;
52 }
53 bool flag = false;
54 string text = dbSchemaRow.ColumnName;
55 if ((_originalPrefix == null || !text.StartsWith(_originalPrefix, StringComparison.OrdinalIgnoreCase)) && (_isNullPrefix == null || !text.StartsWith(_isNullPrefix, StringComparison.OrdinalIgnoreCase)))
56 {
57 if (text.Contains(' '))
58 {
59 text = text.Replace(' ', '_');
60 flag = true;
61 }
63 {
65 _isMutatedName[i] = flag;
66 }
67 }
68 }
70 for (int j = 0; j < schemaRows.Length; j++)
71 {
72 if (_baseParameterNames[j] != null)
73 {
74 if (_originalPrefix != null)
75 {
77 }
78 if (_isNullPrefix != null && schemaRows[j].AllowDBNull)
79 {
81 }
82 }
83 }
85 GenerateMissingNames(schemaRows);
86 }
static bool IsMatch(string input, string pattern)
Definition Regex.cs:406

References System.Data.Common.DbCommandBuilder.ParameterNames._adjustedParameterNameMaxLength, System.Data.Common.DbCommandBuilder.ParameterNames._baseParameterNames, System.Data.Common.DbCommandBuilder.ParameterNames._count, System.Data.Common.DbCommandBuilder.ParameterNames._dbCommandBuilder, System.Data.Common.DbCommandBuilder.ParameterNames._isMutatedName, System.Data.Common.DbCommandBuilder.ParameterNames._isNullPrefix, System.Data.Common.DbCommandBuilder.ParameterNames._nullParameterNames, System.Data.Common.DbCommandBuilder.ParameterNames._originalParameterNames, System.Data.Common.DbCommandBuilder.ParameterNames._originalPrefix, System.Data.Common.DbCommandBuilder.ParameterNames._parameterNameParser, System.Data.Common.DbCommandBuilder.ParameterNames.ApplyProviderSpecificFormat(), System.Data.Common.DbSchemaRow.ColumnName, System.Data.Common.DbCommandBuilder.ParameterNames.EliminateConflictingNames(), System.Data.Common.DbCommandBuilder.ParameterNames.GenerateMissingNames(), System.Data.Common.DbCommandBuilder.ParameterNames.GetAdjustedParameterNameMaxLength(), System.Text.RegularExpressions.i, System.Text.RegularExpressions.Regex.IsMatch(), System.Data.Common.DbCommandBuilder.ParameterNamePattern, System.Data.Common.DbCommandBuilder.ParameterNames.SetAndValidateNamePrefixes(), and System.text.