After deserialization from XML a feed is in a non-normalized form. Before it can be used by Zero Install's other Services it needs to be normalized, by calling the
.Normalize() method. This will:
- Propagate values from
However, if you intend to edit a feed and save it as XML again, you should not call the
.Normalize() method, in order to preserve the feed's structure.
Required fields in the data model are marked as non-nullable. However, in a Feed instance deserialized from XML these fields may be
null anyway. Calling
.Normalize() throws an <xref:System.IO.InvalidDataException > if any required/non-nullable fields are unset. Therefore, only a normalized Feed should be treated as "null-safe".