.NET Format Style Fixes

This commit is contained in:
refringe
2025-06-18 17:09:20 +00:00
committed by Format Bot
parent ca0a7d6345
commit 6e01428b2b
774 changed files with 23507 additions and 40003 deletions
@@ -6,7 +6,8 @@ namespace SPTarkov.Common.Extensions;
public static class ObjectExtensions
{
private static readonly Dictionary<Type, Dictionary<string, PropertyInfo>> _indexedProperties = new();
private static readonly Dictionary<Type, Dictionary<string, PropertyInfo>> _indexedProperties =
new();
private static readonly Lock _indexedPropertiesLockObject = new();
private static bool TryGetCachedProperty(Type type, string key, out PropertyInfo cachedProperty)
@@ -15,7 +16,8 @@ public static class ObjectExtensions
{
if (!_indexedProperties.TryGetValue(type, out var properties))
{
properties = type.GetProperties().ToDictionary(prop => prop.GetJsonName(), prop => prop);
properties = type.GetProperties()
.ToDictionary(prop => prop.GetJsonName(), prop => prop);
_indexedProperties.Add(type, properties);
}
@@ -49,7 +51,7 @@ public static class ObjectExtensions
return default;
}
return (T?) cachedProperty.GetValue(obj);
return (T?)cachedProperty.GetValue(obj);
}
public static List<object> GetAllPropValuesAsList(this object? obj)