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

◆ TryGetValue() [1/3]

bool System.Dynamic.ExpandoObject.TryGetValue ( object indexClass,
int index,
string name,
bool ignoreCase,
out object value )
inlinepackage

Definition at line 512 of file ExpandoObject.cs.

513 {
514 ExpandoData data = _data;
515 if (data.Class != indexClass || ignoreCase)
516 {
517 index = data.Class.GetValueIndex(name, ignoreCase, this);
518 if (index == -2)
519 {
521 }
522 }
523 if (index == -1)
524 {
525 value = null;
526 return false;
527 }
528 object obj = data[index];
529 if (obj == Uninitialized)
530 {
531 value = null;
532 return false;
533 }
534 value = obj;
535 return true;
536 }
int GetValueIndex(string name, bool caseInsensitive, ExpandoObject obj)
static readonly object Uninitialized
static Exception AmbiguousMatchInExpandoObject(object p0)
Definition Error.cs:23

References System.Dynamic.ExpandoObject._data, System.Linq.Expressions.Error.AmbiguousMatchInExpandoObject(), System.Dynamic.ExpandoObject.ExpandoData.Class, System.Dynamic.ExpandoClass.GetValueIndex(), System.index, System.obj, System.Dynamic.ExpandoObject.Uninitialized, and System.value.

Referenced by System.Dynamic.ExpandoObject.TryGetValueForKey().