@@ -69,7 +69,7 @@ public static void GenerateSource(
6969
7070 var postCtorMethods = input . Models . PostCtorMethods
7171 . Where ( m => m . TypeKey == type . TypeKey )
72- . ToList ( ) ;
72+ . ToImmutableArray ( ) ;
7373
7474 var ( source , parameters ) = GenerateSource ( context , type , postCtorMethods , baseParameters , input . Guards ) ;
7575
@@ -85,7 +85,7 @@ public static void GenerateSource(
8585 private static ( SourceText ? , ParameterList ? ) GenerateSource (
8686 EmitterContext context ,
8787 TypeModel type ,
88- IEnumerable < PostCtorModel > markedPostCtorMethods ,
88+ ImmutableArray < PostCtorModel > markedPostCtorMethods ,
8989 IEnumerable < ParameterModel > ? baseParameters ,
9090 bool guards )
9191 {
@@ -201,10 +201,10 @@ private static ITypeSymbol SetGenerics(
201201
202202 private static PostCtorModel ? GetPostCtorMethod (
203203 EmitterContext context ,
204- IEnumerable < PostCtorModel > markedPostCtorMethods )
204+ ImmutableArray < PostCtorModel > markedPostCtorMethods )
205205 {
206206 // ACTR001
207- if ( markedPostCtorMethods . MoreThan ( 1 ) )
207+ if ( markedPostCtorMethods . Length > 1 )
208208 {
209209 foreach ( var m in markedPostCtorMethods )
210210 {
@@ -213,10 +213,10 @@ private static ITypeSymbol SetGenerics(
213213 return null ;
214214 }
215215
216- if ( ! markedPostCtorMethods . Any ( ) )
216+ if ( markedPostCtorMethods . Length != 1 )
217217 return null ;
218218
219- var method = markedPostCtorMethods . First ( ) ;
219+ var method = markedPostCtorMethods [ 0 ] ;
220220
221221 // ACTR002
222222 if ( ! method . ReturnsVoid )
0 commit comments