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

◆ Locale

CultureInfo System.Data.DataTable.Locale
getsetinherited

Definition at line 467 of file DataTable.cs.

468 {
469 get
470 {
471 return _culture;
472 }
473 set
474 {
475 long scopeId = DataCommonEventSource.Log.EnterScope("<ds.DataTable.set_Locale|API> {0}", ObjectID);
476 try
477 {
478 bool cultureUserSet = true;
479 if (value == null)
480 {
481 cultureUserSet = false;
482 value = ((_dataSet != null) ? _dataSet.Locale : _culture);
483 }
484 if (_culture != value && !_culture.Equals(value))
485 {
486 bool flag = false;
487 bool flag2 = false;
490 try
491 {
492 _cultureUserSet = true;
495 {
496 flag = false;
498 flag = true;
499 }
500 }
501 catch
502 {
503 flag2 = true;
504 throw;
505 }
506 finally
507 {
508 if (!flag)
509 {
510 try
511 {
513 }
514 catch (Exception e) when (ADP.IsCatchableExceptionType(e))
515 {
517 }
519 if (!flag2)
520 {
521 throw ExceptionBuilder.CannotChangeCaseLocale(null);
522 }
523 }
524 }
526 }
528 }
529 finally
530 {
531 DataCommonEventSource.Log.ExitScope(scopeId);
532 }
533 }
534 }
static bool IsCatchableExceptionType(Exception e)
Definition ADP.cs:790
static void TraceExceptionWithoutRethrow(Exception e)
Definition ADP.cs:673
bool ValidateLocaleConstraint()
Definition DataSet.cs:2763
CultureInfo Locale
Definition DataSet.cs:337
CultureInfo _culture
Definition DataTable.cs:94
bool SetLocaleValue(CultureInfo culture, bool userSet, bool resetIndexes)
override bool Equals([NotNullWhen(true)] object? value)

Referenced by System.Data.DataRelationCollection.AddCore(), System.Data.ForeignKeyConstraint.CheckCanAddToCollection(), System.Data.DataTable.GetSpecialHashCode(), System.Data.XmlTreeGen.HandleTable(), System.Data.DataColumnCollection.IndexOfCaseInsensitive(), System.Data.ConstraintCollection.InternalIndexOf(), System.Data.DataColumnCollection.RegisterColumnName(), System.Data.ConstraintCollection.RegisterName(), System.Data.DataTable.SerializeTableSchema(), System.Data.DataView.ToTable(), System.Data.ConstraintCollection.UnregisterName(), and System.Data.DataColumnCollection.UnregisterName().