@@ -34,28 +34,27 @@ private static string WritePeople(PersonCollectionResponseDocument? peopleRespon
34
34
return builder . ToString ( ) ;
35
35
}
36
36
37
- private static void WritePerson ( PersonDataInResponse person , ICollection < DataInResponse > includes , StringBuilder builder )
37
+ private static void WritePerson ( PersonDataInResponse person , List < DataInResponse > includes , StringBuilder builder )
38
38
{
39
- ICollection < TodoItemIdentifierInResponse > assignedTodoItems = person . Relationships ? . AssignedTodoItems ? . Data ?? [ ] ;
39
+ List < TodoItemIdentifierInResponse > assignedTodoItems = person . Relationships ? . AssignedTodoItems ? . Data ?? [ ] ;
40
40
41
41
builder . AppendLine ( $ " Person { person . Id } : { person . Attributes ? . DisplayName } with { assignedTodoItems . Count } assigned todo-items:") ;
42
42
WriteRelatedTodoItems ( assignedTodoItems , includes , builder ) ;
43
43
}
44
44
45
- private static void WriteRelatedTodoItems ( IEnumerable < TodoItemIdentifierInResponse > todoItemIdentifiers , ICollection < DataInResponse > includes ,
46
- StringBuilder builder )
45
+ private static void WriteRelatedTodoItems ( List < TodoItemIdentifierInResponse > todoItemIdentifiers , List < DataInResponse > includes , StringBuilder builder )
47
46
{
48
47
foreach ( TodoItemIdentifierInResponse todoItemIdentifier in todoItemIdentifiers )
49
48
{
50
49
TodoItemDataInResponse includedTodoItem = includes . OfType < TodoItemDataInResponse > ( ) . Single ( include => include . Id == todoItemIdentifier . Id ) ;
51
- ICollection < TagIdentifierInResponse > tags = includedTodoItem . Relationships ? . Tags ? . Data ?? [ ] ;
50
+ List < TagIdentifierInResponse > tags = includedTodoItem . Relationships ? . Tags ? . Data ?? [ ] ;
52
51
53
52
builder . AppendLine ( $ " TodoItem { includedTodoItem . Id } : { includedTodoItem . Attributes ? . Description } with { tags . Count } tags:") ;
54
53
WriteRelatedTags ( tags , includes , builder ) ;
55
54
}
56
55
}
57
56
58
- private static void WriteRelatedTags ( IEnumerable < TagIdentifierInResponse > tagIdentifiers , ICollection < DataInResponse > includes , StringBuilder builder )
57
+ private static void WriteRelatedTags ( List < TagIdentifierInResponse > tagIdentifiers , List < DataInResponse > includes , StringBuilder builder )
59
58
{
60
59
foreach ( TagIdentifierInResponse tagIdentifier in tagIdentifiers )
61
60
{
0 commit comments