You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pubenumTypeContext{/// Used when generating the types of fields in structs, classes, and exceptions.Field,/// Used when generating the types of operation parameters, and return types in places where/// they're being decoded.Decode,/// Used when generating the types of operation parameters, and return types in places where/// they're being encoded.Encode,/// Used when generating types that are parts of other types, such as the success & failure types of results,/// the key & value types of dictionaries, or the element type of a sequence.Nested,}
First, we should always treat Field and Nested the same, so there is no need for 2 enumerators. It should always be Field.
Then, Encode/Decode are confusing. I propose to rename them IncomingParam / OutgoingParam.
The text was updated successfully, but these errors were encountered:
More cleanup has been done, the biggest being #3893.
Now, we no longer use TypeContext for the functions that have replaced cs_type_string.
Now it's really only used in the proxy and dispatch generation code, and the functions that it calls into.
But, there's room for extra improvement, since the proxy side only uses OutgoingParam and Field.
And the dispatch side only uses IncomingParam and Field.
So in reality, it behaves more like a bool, and we only need 2 of it's values at any given time.
The TypeContext enum is too complicated:
First, we should always treat Field and Nested the same, so there is no need for 2 enumerators. It should always be Field.
Then, Encode/Decode are confusing. I propose to rename them IncomingParam / OutgoingParam.
The text was updated successfully, but these errors were encountered: