Skip to content

Conversation

aensidhe
Copy link
Member

Implementing IReadOnlyDictionary seems to be reasonable choice, but question arises: what should we return in untyped Enumerator?

{
using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_7()))
{
foreach (var pair in (IReadOnlyDictionary<string, ISpace>)tarantoolClient.Schema)
Copy link
Member Author

Choose a reason for hiding this comment

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

This will be pain in the ass, because you always forced to cast schema to exact interface.

{
using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_7()))
{
foreach (var pair in (IReadOnlyDictionary<string, ISpace>)tarantoolClient.Schema)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about exposing IndexByName and IndexById as IReadonlyDictionaries instead of decoration?

Copy link
Member Author

Choose a reason for hiding this comment

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

box.Schema.IndexByName ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, typo, should be:

  • Properties IndexByName and IndexById in Space
  • Properties SpaceByName and SpaceById in Schema

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.

2 participants