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

◆ Find()

virtual ? PropertyDescriptor System.ComponentModel.PropertyDescriptorCollection.Find ( string name,
bool ignoreCase )
inlinevirtual

Definition at line 314 of file PropertyDescriptorCollection.cs.

315 {
317 {
318 PropertyDescriptor result = null;
320 {
322 if (ignoreCase)
323 {
324 _cachedFoundProperties = new Hashtable(StringComparer.OrdinalIgnoreCase);
325 }
326 else
327 {
329 }
330 }
332 if (obj != null)
333 {
334 return (PropertyDescriptor)obj;
335 }
336 for (int i = 0; i < Count; i++)
337 {
338 if (ignoreCase)
339 {
340 if (string.Equals(_properties[i].Name, name, StringComparison.OrdinalIgnoreCase))
341 {
343 result = _properties[i];
344 break;
345 }
346 }
347 else if (_properties[i].Name.Equals(name))
348 {
350 result = _properties[i];
351 break;
352 }
353 }
354 return result;
355 }
356 }
override bool Equals([NotNullWhen(true)] object? obj)

References System.ComponentModel.PropertyDescriptorCollection._cachedFoundProperties, System.ComponentModel.PropertyDescriptorCollection._cachedIgnoreCase, System.ComponentModel.PropertyDescriptorCollection._internalSyncObject, System.ComponentModel.PropertyDescriptorCollection._properties, System.ComponentModel.PropertyDescriptorCollection.Count, System.ComponentModel.PropertyDescriptor.Equals(), System.Name, System.obj, and System.StringComparer.OrdinalIgnoreCase.

Referenced by System.ComponentModel.BindingList< T >.Child_PropertyChanged(), Terraria.Localization.LocalizedText.FormatWith(), and Terraria.Utils.FormatWith().