Ejemplo n.º 1
0
        public List <KeyValuePair <string, object[]> > GetPropertiesValues()
        {
            List <KeyValuePair <string, object[]> > results = new List <KeyValuePair <string, object[]> >();

            foreach (var file in SmartFile.GetSmartTables()[SelectedTable].Files)
            {
                var jObject = (JObject)JsonConvert.DeserializeObject(file.Value);

                object[] properties = Array.ConvertAll <JToken, object>(jObject.PropertyValues().ToArray(), x => x.ToString());
                results.Add(new KeyValuePair <string, object[]>(file.FileName, properties));
            }

            return(results);
        }
Ejemplo n.º 2
0
        public string[] GetProperties()
        {
            var files = SmartFile.GetSmartTables()[SelectedTable].Files;

            if (files.Count == 0)
            {
                return(new string[0]);
            }

            var objRef = files[0];

            var jObject = (JObject)JsonConvert.DeserializeObject(objRef.Value);

            return(Array.ConvertAll(jObject.Properties().ToArray(), x => x.Name));
        }
Ejemplo n.º 3
0
 public string[] GetDirectoriesNames()
 {
     return(SmartFile.GetSmartTables().Keys.ToArray());
 }