Example #1
0
        public async Task <StructureFile> DownloadStructureFileAsync(CancellationToken cancellationToken)
        {
            CheckBeforeOperation();
            string s = await _webSocket.RequestStringAsync("data/LoxAPP3.json", cancellationToken).ConfigureAwait(false);

            return(StructureFile.Parse(s));
        }
Example #2
0
 public MiniserverContext(ILogger logger, StructureFile structureFile, MiniserverConnection connection = null, bool ownsConnection = true)
 {
     Logger = logger;
     if (structureFile != null)
     {
         SetStructureFile(structureFile, nameof(structureFile), throwOnNull: true);
     }
     if (connection != null)
     {
         SetConnection(connection, ownsConnection, nameof(connection));
     }
 }