Change IArchive.Entries from IEnumerable<IArchiveEntry> to ICollection<IArchiveEntry> #341

Open
opened 2026-01-29 22:10:25 +00:00 by claunia · 3 comments
Owner

Originally created by @AlexeiScherbakov on GitHub (Jan 2, 2019).

When using IArchive interface, I cannot get total count of entries. But all implementations are actually ICollection (AbstractArchive<TEntry, TVolume>.Entries is a Collection)

Originally created by @AlexeiScherbakov on GitHub (Jan 2, 2019). When using IArchive interface, I cannot get total count of entries. But all implementations are actually ICollection (AbstractArchive<TEntry, TVolume>.Entries is a Collection)
Author
Owner

@adamhathcock commented on GitHub (Jan 2, 2019):

Created pull request. Will finish next week.

@adamhathcock commented on GitHub (Jan 2, 2019): Created pull request. Will finish next week.
Author
Owner

@adamhathcock commented on GitHub (Jan 3, 2019):

Not sure I can do this because I'm still supporting .NET 3.5. The reason is because of generic covariance which didn't exist until .NET 4.0.

@adamhathcock commented on GitHub (Jan 3, 2019): Not sure I can do this because I'm still supporting .NET 3.5. The reason is because of generic covariance which didn't exist until .NET 4.0.
Author
Owner

@AlexeiScherbakov commented on GitHub (Jan 3, 2019):

I see. May be better introduce property int EntriesCount{get;} in IArchive.
And property bool EntriesCountAvaliable{get;} - if situation when we cannot
get count is exist

чт, 3 Янв 2019, 17:34 Adam Hathcock notifications@github.com:

Not sure I can do this because I'm still supporting .NET 3.5. The reason
is because of generic covariance which didn't exist until .NET 4.0.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/adamhathcock/sharpcompress/issues/432#issuecomment-451160216,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIQ7O18YrR76fdXsbDQ7ayuVAFHnxLtrks5u_hTegaJpZM4ZmLKo
.

@AlexeiScherbakov commented on GitHub (Jan 3, 2019): I see. May be better introduce property int EntriesCount{get;} in IArchive. And property bool EntriesCountAvaliable{get;} - if situation when we cannot get count is exist чт, 3 Янв 2019, 17:34 Adam Hathcock notifications@github.com: > Not sure I can do this because I'm still supporting .NET 3.5. The reason > is because of generic covariance which didn't exist until .NET 4.0. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/adamhathcock/sharpcompress/issues/432#issuecomment-451160216>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AIQ7O18YrR76fdXsbDQ7ayuVAFHnxLtrks5u_hTegaJpZM4ZmLKo> > . >
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#341