File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -39,17 +39,15 @@ public static AttributeInfo From(AttributeData attributeData)
39
39
. ToImmutableArray ( ) ;
40
40
41
41
// Get the named arguments
42
- ImmutableArray < ( string , TypedConstantInfo ) > . Builder namedArguments = ImmutableArray . CreateBuilder < ( string , TypedConstantInfo ) > ( ) ;
43
-
44
- foreach ( KeyValuePair < string , TypedConstant > arg in attributeData . NamedArguments )
45
- {
46
- namedArguments . Add ( ( arg . Key , TypedConstantInfo . From ( arg . Value ) ) ) ;
47
- }
42
+ ImmutableArray < ( string , TypedConstantInfo ) > namedArguments =
43
+ attributeData . NamedArguments
44
+ . Select ( static arg => ( arg . Key , TypedConstantInfo . From ( arg . Value ) ) )
45
+ . ToImmutableArray ( ) ;
48
46
49
47
return new (
50
48
typeName ,
51
49
constructorArguments ,
52
- namedArguments . ToImmutable ( ) ) ;
50
+ namedArguments ) ;
53
51
}
54
52
55
53
/// <summary>
You can’t perform that action at this time.
0 commit comments