Ejemplo n.º 1
0
        public static void CheckFile(string hgdFileName)
        {
            var    azure     = new AzureDataSync("holograph");
            Stream outStream = new MemoryStream();

            azure.Download(hgdFileName, ref outStream);
            outStream.Seek(0, SeekOrigin.Begin);
            var hgd2 = new HoloGraphData.HoloGraphData(outStream);

            Console.WriteLine(hgd2.ViewJson);
            Console.WriteLine(hgd2.SchemaJson);
            Console.WriteLine(hgd2.MappingJson);
        }
Ejemplo n.º 2
0
        public void UploadCsvAsHgd(string tsvPath, string columnTypes, string geom = null, string xAxis = null, string yAxis = null, string zAxis = null, string color = null)
        {
            var hgd = new HoloGraphData.HoloGraphData();

            var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(tsvPath);

            hgd.ReadDataFromTsv(tsvPath, columnTypes);
            hgd.SetViewProperties(fileNameWithoutExtension, geom, xAxis, yAxis, zAxis, color);

            Stream dataStream = new MemoryStream();

            hgd.ToStream(ref dataStream);
            dataStream.Seek(0, SeekOrigin.Begin);

            var hgdFilename = string.Format("{0}.hgd", fileNameWithoutExtension.Replace(" ", "_"));

            _azureConnection.Upload(hgdFilename, dataStream);
        }