/// <summary> /// Gets the stream for the specified zip file entry. The stream access will depend on the mode of the zip file. /// </summary> /// <param name="gedxEntry">The entry that contains the desired resource.</param> /// <returns>The stream for the specified zip file entry. The stream access will depend on the mode of the zip file.</returns> public Stream GetResourceStream(GedcomxFileEntry gedxEntry) { return(gedxEntry.ZipEntry.Open()); }
/// <summary> /// Deserializes the specified file entry to the requested object type. /// </summary> /// <typeparam name="T">The type the object will be deserialized to.</typeparam> /// <param name="gedxEntry">The file entry to deserialize.</param> /// <returns>An instance of T representing the object deserialized.</returns> public T ReadResource <T>(GedcomxFileEntry gedxEntry) { return(this.deserializer.Deserialize <T>(GetResourceStream(gedxEntry))); }