本文整理汇总了C#中System.Data.DataSet.ShouldSerializeLocale方法的典型用法代码示例。如果您正苦于以下问题:C# DataSet.ShouldSerializeLocale方法的具体用法?C# DataSet.ShouldSerializeLocale怎么用?C# DataSet.ShouldSerializeLocale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Data.DataSet
的用法示例。
在下文中一共展示了DataSet.ShouldSerializeLocale方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadXmlSchema
internal void ReadXmlSchema(XmlReader reader, bool denyResolving)
{
IntPtr hscp;
Bid.ScopeEnter(out hscp, "<ds.DataTable.ReadXmlSchema|INFO> %d#, denyResolving=%d{bool}\n", ObjectID, denyResolving);
try{
DataSet ds = new DataSet();
SerializationFormat cachedRemotingFormat = this.RemotingFormat;
// fxcop: ReadXmlSchema will provide the CaseSensitive, Locale, Namespace information
ds.ReadXmlSchema(reader, denyResolving);
string CurrentTableFullName = ds.MainTableName;
if (Common.ADP.IsEmpty(this.tableName) && Common.ADP.IsEmpty(CurrentTableFullName))
return;
DataTable currentTable = null;
if (!Common.ADP.IsEmpty(this.tableName)) {
if (!Common.ADP.IsEmpty(this.Namespace)) {
currentTable = ds.Tables[this.tableName, this.Namespace];
}
else {//SQL BU defect tracking 240293
int tableIndex = ds.Tables.InternalIndexOf(this.tableName);
if (tableIndex > -1) {
currentTable = ds.Tables[tableIndex];
}
}
}
else{ //!Common.ADP.IsEmpty(CurrentTableFullName)
string CurrentTableNamespace = "";
int nsSeperator = CurrentTableFullName.IndexOf(':');
if (nsSeperator > -1) {
CurrentTableNamespace = CurrentTableFullName.Substring(0, nsSeperator);
}
string CurrentTableName = CurrentTableFullName.Substring(nsSeperator + 1, CurrentTableFullName.Length - nsSeperator -1);
currentTable = ds.Tables[CurrentTableName, CurrentTableNamespace];
}
if (currentTable == null) { // bug fix :99186
string qTableName = string.Empty;
if (!Common.ADP.IsEmpty(this.tableName)) {
qTableName = (this.Namespace.Length > 0)? (this.Namespace + ":" + this.tableName):this.tableName;
}
else {
qTableName = CurrentTableFullName ;
}
throw ExceptionBuilder.TableNotFound(qTableName);
}
currentTable._remotingFormat = cachedRemotingFormat;
List<DataTable> tableList = new List<DataTable>();
tableList.Add(currentTable);
CreateTableList(currentTable, tableList);
List<DataRelation> relationList = new List<DataRelation>();
CreateRelationList(tableList, relationList);
if (relationList.Count == 0) {
if (this.Columns.Count == 0) {
DataTable tempTable = currentTable;
if (tempTable != null)
tempTable.CloneTo(this, null, false); // we may have issue Amir
if (this.DataSet == null && this.tableNamespace == null) { // webdata 105506
// for standalone table, clone wont get these correctly, since they may come with inheritance
this.tableNamespace = tempTable.Namespace;
}
}
return;
}
else {
if (Common.ADP.IsEmpty(this.TableName)) {
this.TableName = currentTable.TableName;
if (!Common.ADP.IsEmpty(currentTable.Namespace)) {
this.Namespace = currentTable.Namespace;
}
}
if (this.DataSet == null) {
DataSet dataset = new DataSet(ds.DataSetName);
// webdata 105506
// if user set values on DataTable, it isn't necessary
// to set them on the DataSet because they won't be inherited
// but it is simpler to set them in both places
// if user did not set values on DataTable, it is required
// to set them on the DataSet so the table will inherit
// the value already on the Datatable
dataset.SetLocaleValue(ds.Locale, ds.ShouldSerializeLocale());
dataset.CaseSensitive = ds.CaseSensitive;
dataset.Namespace = ds.Namespace;
dataset.mainTableName = ds.mainTableName;
dataset.RemotingFormat = ds.RemotingFormat;
dataset.Tables.Add(this);
}
DataTable targetTable = CloneHierarchy(currentTable, this.DataSet, null);
foreach(DataTable tempTable in tableList) {
DataTable destinationTable = this.DataSet.Tables[tempTable.tableName, tempTable.Namespace];
//.........这里部分代码省略.........