Skip to content

Conversation

@jenniferplusplus
Copy link
Collaborator

And make OrderedCollection inherit from Collection

This just updates some types to more closely match the spec.

And make OrderedCollection inherit from Collection
/// <seealso href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection" />
/// <seealso href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection" />
public class ASOrderedCollection : ASObject, IASModel<ASOrderedCollection, ASOrderedCollectionEntity, ASObject>, IEnumerable<Linkable<ASObject>>
public class ASOrderedCollection : ASCollection, IASModel<ASOrderedCollection, ASOrderedCollectionEntity, ASCollection>, IEnumerable<Linkable<ASObject>>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this, unfortunately, won't work because ASCollection has a separate entity with a separate copy of the collection. It may be possible to support this by loading the same entity into both classes - I'll take a look into that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not that big of a deal, honestly. I'll split out the shared inbox. The rest is workable as-is. The AS2 inheritance tree is nonsensical.

/// <seealso href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-collection" />
/// <seealso href="https://www.w3.org/TR/activitystreams-vocabulary/#dfn-orderedcollection" />
public class ASOrderedCollection : ASObject, IASModel<ASOrderedCollection, ASOrderedCollectionEntity, ASObject>, IEnumerable<Linkable<ASObject>>
public class ASOrderedCollection : ASCollection, IASModel<ASOrderedCollection, ASOrderedCollectionEntity, ASCollection>, IEnumerable<Linkable<ASObject>>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it also breaks for ASOrderedCollectionPage, which should logically be assignable to both ASOrderedCollection and ASCollectionPage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants