static RestClientExtensions() { XmlSerializer = new DefaultXmlSerialization(); XmlDeserializer = (IGedcomxEntryDeserializer)XmlSerializer; JsonSerializer = new DefaultJsonSerialization(); JsonDeserializer = (IGedcomxEntryDeserializer)JsonSerializer; }
/// <summary> /// Initializes a new instance of the <see cref="GedcomxFile"/> class. /// </summary> /// <param name="gedxFile">The GEDCOM X file.</param> /// <param name="deserializer">The deserializer to use for deserializing data streams from the file.</param> public GedcomxFile(FileInfo gedxFile, IGedcomxEntryDeserializer deserializer) { this.gedxFile = gedxFile; this.gedxArc = ZipFile.OpenRead(gedxFile.FullName); this.deserializer = deserializer; this.attributes = ManifestAttributes.Parse(this.gedxArc); }