Blockcore.Features.Dns.DnsSeedMasterFile.Save C# (CSharp) Метод

Save() публичный Метод

Saves the cached masterfile to the specified stream.
public Save ( Stream stream ) : void
stream Stream The stream to write the masterfile to.
Результат void
        public void Save(Stream stream)
        {
            Guard.NotNull(stream, nameof(stream));

            var textWriter = new JsonTextWriter(new StreamWriter(stream));
            JsonSerializer serializer = this.CreateSerializer();

            // Send a copy of the entries to the serializer because the collection can be modified during serialization.
            serializer.Serialize(textWriter, this.entries.ToList());
            textWriter.Flush();
        }