public void loadFiles() { StatesConverter cnvLabels; EntitiesData datEnts; try { var ft = new HugoBotWebApplication.Discretistation.FileHandler(); string pathWithClass = Session["correntPathToIndex"].ToString(); var ansFromGetChunks = ft.GetChunks(pathWithClass); // we don't use this data, this is just init for chunk creation TestMemory._chunkesLargerThanZero = new List<string>(ansFromGetChunks); // ask for index file pathWithClass += "/index"; indexFileAsByteArr = ft.GetChunk(pathWithClass); // ask for index file // ask for entities file string datasetGUID = ((Dataset)Session["dataset"]).Path; byte[] entitiesByteArr = ft.GetFile(datasetGUID + "/entities"); // ask for states file string pathWithDiscConfig = (string)Session["discConfig"]; string pathToState = pathWithDiscConfig + "/states"; byte[] statesByteArr = ft.GetStates(pathToState); // load states file cnvLabels = new StatesConverter(statesByteArr); // load enetites file datEnts = new EntitiesData(entitiesByteArr); // create curResultsObject LoadLegoResultsDataset(indexFileAsByteArr, cnvLabels, datEnts); // assiggn curResult to class that not goint to be deleted after uploading TestMemory.curResults = this.curResults; TestMemory.index = getIndex(); } catch(Exception ex) { var axax = 1; } }
public object[] getIndex() { List<object> l = new List<object>(); try { string correntPath = Session["correntPathToIndex"].ToString(); var ft = new HugoBotWebApplication.Discretistation.FileHandler(); var ansFromGetChunks = ft.GetChunks(correntPath); correntPath += "/index"; var indexBeforeParse = ft.GetChunk(correntPath); l = FileConvertor.parseByteArrToIndex(indexBeforeParse); } catch { } return l.ToArray(); }