Skip to content

Conversation

@Lukasz825700516
Copy link
Contributor

Added new method to RSI.StateId Argument that takes anything and uses that to construct new StateId using the old one as a prefix.

why

I seen that in Content.Client there is no consistency in constructing StateIds using prefixes and values, as sometimes they use - separator, and sometimes not. Also, StateId exists, but its rarely used, and in context of such generated ids based on prefix, string? is used most of the times.

So I added this method to break all StateIds that dont use - normalize the codebase.

implementation

As of now, the new Argument method lives in StateId and returns StateId meaning you could use any state id prefix as standalone StateId. This may not be an optimal solution as putting it into some new StateIdPrefix might be better for type safety, but I was lazy decided to minimize number of required changes to implement it if PR get merged, also Im not sure if there isnt RSI where prefix alone would be valid.

@PJB3005
Copy link
Member

PJB3005 commented Jun 11, 2025

Yeah I think this should just be extension methods in content instead.

@PJB3005 PJB3005 closed this Jun 11, 2025
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