/// <summary>
 /// Initializes a new instance of the <see cref="GedcomxOutputStream"/> class.
 /// </summary>
 /// <param name="gedxOutputStream">The underlying data stream this GEDCOM X will be written to.</param>
 /// <param name="serializer">The serializer to use when adding objects to this GEDCOM X file.</param>
 public GedcomxOutputStream(Stream gedxOutputStream, IGedcomxEntrySerializer serializer)
 {
     this.serializer = serializer;
     this.gedxOutputStream = new ZipArchive(gedxOutputStream, ZipArchiveMode.Create, false, Encoding.UTF8);
     this.mf = new ManifestAttributes(this.gedxOutputStream);
     this.mf.MainAttributes.Put("Manifest-Version", "1.0");
 }
Exemplo n.º 2
0
 static RestClientExtensions()
 {
     XmlSerializer    = new DefaultXmlSerialization();
     XmlDeserializer  = (IGedcomxEntryDeserializer)XmlSerializer;
     JsonSerializer   = new DefaultJsonSerialization();
     JsonDeserializer = (IGedcomxEntryDeserializer)JsonSerializer;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GedcomxOutputStream"/> class.
 /// </summary>
 /// <param name="gedxOutputStream">The underlying data stream this GEDCOM X will be written to.</param>
 /// <param name="serializer">The serializer to use when adding objects to this GEDCOM X file.</param>
 public GedcomxOutputStream(Stream gedxOutputStream, IGedcomxEntrySerializer serializer)
 {
     this.serializer       = serializer;
     this.gedxOutputStream = new ZipArchive(gedxOutputStream, ZipArchiveMode.Create, false, Encoding.UTF8);
     this.mf = new ManifestAttributes(this.gedxOutputStream);
     this.mf.MainAttributes.Put("Manifest-Version", "1.0");
 }