Exemple #1
0
            public void WriteTest() => File.OpenRead(FileName).Using(x => Helpers.AssertStream(x, stream =>
            {
                var outStream = new MemoryStream();
                SpawnScript.Write(outStream, SpawnScript.Read(stream));

                return(outStream);
            }));
        public IEnumerable <Bar.Entry> SaveToBar(IEnumerable <Bar.Entry> entries)
        {
            var memStream = new MemoryStream();

            SpawnScript.Write(memStream, _spawnScripts);

            return(entries.AddOrReplace(new Bar.Entry
            {
                Name = _name,
                Type = Bar.EntryType.SpawnScript,
                Stream = memStream
            }));
        }