File tree 2 files changed +12
-0
lines changed
Source/ActivityPub.Types/AS/Collection
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,14 @@ public LinkableList<ASObject>? Items
112
112
/// <summary>
113
113
/// True if this is a paged collection, false otherwise.
114
114
/// </summary>
115
+ [ MemberNotNullWhen ( true , nameof ( FirstPopulated ) ) ]
115
116
public bool IsPaged => Current != null || First != null || Last != null ;
116
117
118
+ /// <summary>
119
+ /// In a paged Collection, gets the first populated entity.
120
+ /// </summary>
121
+ public Linkable < ASCollectionPage > ? FirstPopulated => Current ?? First ?? Last ;
122
+
117
123
/// <summary>
118
124
/// True if this collection instance contains items, false otherwise.
119
125
/// </summary>
Original file line number Diff line number Diff line change @@ -113,8 +113,14 @@ public LinkableList<ASObject>? Items
113
113
/// <summary>
114
114
/// True if this is a paged collection, false otherwise.
115
115
/// </summary>
116
+ [ MemberNotNullWhen ( true , nameof ( FirstPopulated ) ) ]
116
117
public bool IsPaged => Current != null || First != null || Last != null ;
117
118
119
+ /// <summary>
120
+ /// In a paged Collection, gets the first populated entity.
121
+ /// </summary>
122
+ public Linkable < ASOrderedCollectionPage > ? FirstPopulated => Current ?? First ?? Last ;
123
+
118
124
/// <summary>
119
125
/// True if this collection instance contains items, false otherwise.
120
126
/// </summary>
You can’t perform that action at this time.
0 commit comments