Only override ProductId/Version if they arent already provided
Fix for https://github.com/rianjs/ical.net/issues/408
This change is safe. I am not sure I understand your concerns.,
The issue is that ProdId and Version where being overwritten and forced to the iCal.net values. The only change here is if they are not set it will continue to work as it has been. The allows people to set the values without having to worry about them being overwritten. Which is the source of the issue for us, and how I understood the bug #408 have you read that?
This serialization is serializing from an object to a string. Also, not sure why it matters if it came from code or was deserialized from another source.
Anyone who is using the Internet Calendar format as specified by its RFC should know how and why to set ProdId and Version and that they should ensure it is set before serializing to a string. If they don't then they get the Ical.net defaults.
I will leave it to @rianjs to review as it does resolve the bug that is currently open and which is one I have had to work around and would like to remove my workaround.
Any news on this?