Fix IDE0090

This commit is contained in:
RoosterDragon
2023-04-05 19:34:12 +01:00
committed by Pavel Penev
parent 164abfdae1
commit 8a285f9b19
385 changed files with 790 additions and 794 deletions

View File

@@ -19,15 +19,13 @@ namespace OpenRA
public class Utility
{
static readonly ConcurrentCache<Type, FieldInfo[]> TypeFields =
new ConcurrentCache<Type, FieldInfo[]>(type => type.GetFields());
new(type => type.GetFields());
static readonly ConcurrentCache<(MemberInfo Member, Type AttributeType), bool> MemberHasAttribute =
new ConcurrentCache<(MemberInfo Member, Type AttributeType), bool>(
x => Attribute.IsDefined(x.Member, x.AttributeType));
new(x => Attribute.IsDefined(x.Member, x.AttributeType));
static readonly ConcurrentCache<(MemberInfo Member, Type AttributeType, bool Inherit), object[]> MemberCustomAttributes =
new ConcurrentCache<(MemberInfo Member, Type AttributeType, bool Inherit), object[]>(
x => x.Member.GetCustomAttributes(x.AttributeType, x.Inherit));
new(x => x.Member.GetCustomAttributes(x.AttributeType, x.Inherit));
public static FieldInfo[] GetFields(Type type)
{