-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use static interfaces, remove AdHoc Encoding. #132
base: master
Are you sure you want to change the base?
Conversation
d0a3b42
to
5cc8202
Compare
@@ -577,7 +579,9 @@ module TestInterfaces = | |||
Assert.StringContains ("", "brand", stjCarJson) | |||
Assert.StringContains ("", "brand", stjGCarJson) | |||
|
|||
do ICodecInterface<IVehicle>.RegisterCodec<AdHocEncoding, Truck> Truck.ObjCodec | |||
do ICodecInterface<IVehicle>.RegisterCodec<Fleece.SystemJson.Encoding , Truck> Truck.ObjCodec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
My feeling is that you could register multiple for the subset that you care about, why ad hoc encoding might be less useful in reality. |
There was surprisingly few changes that I had to do in order to get it working with a sample project: |
Well it seems only one in the code: |
I'll try it then 👍 |
c8ccdf4
to
d98b168
Compare
This will take advantage of static interfaces, which is the natural way of conding the
IEncoding
interface.The question is what do we do with codec for interfaces which uses Ad-Hoc Encoding which relied in an instance to call the interface methods.