Exemplo n.º 1
0
 public void InitializeIndex(ConnectParameters connectionString, string json)
 {
     _dbConn.OpenConnection(connectionString);
     JsonIndexArray = JArray.Parse(json);
     _idxData       = new List <IndexFileData>();
     foreach (JToken level in JsonIndexArray)
     {
         _idxData.Add(ProcessJTokens(level));
         ProcessIndexArray(JsonIndexArray, level);
     }
 }
Exemplo n.º 2
0
        public void LoadLASFile(ConnectParameters connector, string fileText)
        {
            string versionInfo   = "";
            string wellInfo      = "";
            string curveInfo     = "";
            string parameterInfo = "";
            string dataInfo      = "";

            string[] sections = fileText.Split("~", StringSplitOptions.RemoveEmptyEntries);
            foreach (string section in sections)
            {
                string flag = section.Substring(0, 1);
                if (flag == "V")
                {
                    versionInfo = section;
                }
                if (flag == "W")
                {
                    wellInfo = section;
                }
                if (flag == "C")
                {
                    curveInfo = section;
                }
                if (flag == "P")
                {
                    parameterInfo = section;
                }
                if (flag == "A")
                {
                    dataInfo = section;
                }
            }

            _dbConn.OpenConnection(connector);

            GetVersionInfo(versionInfo);
            GetHeaderInfo(wellInfo);
            GetCurveInfo(curveInfo);
            GetDataInfo(dataInfo);
            LoadLogs();

            _dbConn.CloseConnection();
        }