Exemplo n.º 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);
            }));
Exemplo n.º 2
0
        public static SpawnScriptModel Create(List <Bar.Entry> entries, string name)
        {
            var entry = entries
                        .FirstOrDefault(x => x.Name == name && x.Type == Bar.EntryType.SpawnScript);

            if (entry == null)
            {
                return(null);
            }

            return(new SpawnScriptModel(name, SpawnScript.Read(entry.Stream)));
        }