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
Rough and ready prototype of custom serialization #2663
Conversation
This is to demonstrate *one* possible approach to googleapis#2534.
} | ||
|
||
[FirestoreData(Converter = typeof(EmailConverter))] | ||
public sealed class Email |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
public string Name { get; set; } | ||
|
||
[FirestoreProperty] | ||
public Email Email { get; set; } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
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.
Thanks for the comments. I'm pretty sure we want to be able to separate converter from the model itself. (All serialization approaches I've seen which are based on the model implementing the interface end up being painful with respect to immutability, at the very least.)
I think we need to discuss requirements and implementation options around the MailAddress and "shared model" scenarios. (Is the latter even a scenario which is wanted, for example?)
public string Name { get; set; } | ||
|
||
[FirestoreProperty] | ||
public Email Email { get; set; } |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
} | ||
|
||
[FirestoreData(Converter = typeof(EmailConverter))] | ||
public sealed class Email |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Closing this now as the real implementation is on the way. |
This is to demonstrate one possible approach to #2534.