Ejemplo n.º 1
0
        private string DumpMataDataString(List <RailKeyValueResult> list)
        {
            StringBuilder stringBuilder = new StringBuilder();

            using (List <RailKeyValueResult> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    RailKeyValueResult current = enumerator.Current;
                    stringBuilder.Append("key: " + (string)current.key + " value: " + (string)current.value);
                }
            }
            return(stringBuilder.ToString());
        }
Ejemplo n.º 2
0
        private string GetValueByKey(string key, List <RailKeyValueResult> list)
        {
            string str = (string)null;

            using (List <RailKeyValueResult> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    RailKeyValueResult current = enumerator.Current;
                    if ((string)current.key == key)
                    {
                        str = (string)current.value;
                        break;
                    }
                }
            }
            return(str);
        }