Exemplo n.º 1
0
        public async Task Save()
        {
            if (Dirty)
            {
                using (StreamWriter writer = new StreamWriter(ListingFilename))
                {
                    writer.Write(JsonConvert.SerializeObject(this, Formatting.Indented));
                }

                string hashFilename = await IpfsApiWrapper.AddAsync(ListingFilename);

                await IpfsApiWrapper.PublishAsync(hashFilename);

                Dirty = false;
            }
        }
Exemplo n.º 2
0
        public async Task Save()
        {
            if (Dirty)
            {
                using (StreamWriter writer = new StreamWriter(ListingFilename))
                {
                    writer.Write(JsonConvert.SerializeObject(this, Formatting.Indented));
                }

                string hashFilename = await IpfsApiWrapper.AddAsync(ListingFilename);

                string filenameHashIpnsEntry = await IpfsApiWrapper.GetAdditionalInformation("salus");

                await IpfsApiWrapper.PublishAsync(hashFilename, filenameHashIpnsEntry);

                Dirty = false;
            }
        }