Пример #1
0
 static partial void WriteBinaryBodyTemplateCustom(MutagenWriter writer, IArmorAddonGetter item)
 {
     if (item.BodyTemplate.TryGet(out var templ))
     {
         BodyTemplateBinaryWriteTranslation.Write(writer, templ);
     }
 }
Пример #2
0
        private void AssertBinaryEquality(IRaceGetter race, string path)
        {
            var fs = new MockFileSystem();

            using (var writer = new MutagenWriter(fs.FileStream.Create("C:/output", FileMode.Create),
                                                  new WritingBundle(GameConstants.SkyrimSE)
            {
                MasterReferences = new MasterReferenceReader("Skyrim.esm"),
                FormVersion = race.FormVersion
            }))
            {
                BodyTemplateBinaryWriteTranslation.Write(writer, race.BodyTemplate !);
            }
            var exported = fs.File.ReadAllBytes("C:/output");
            var expected = File.ReadAllBytes(path);

            exported.Should().Equal(expected);
        }