コード例 #1
0
ファイル: BinFileValue.cs プロジェクト: FateNineMeow/LuMei
 public void GetValues(ref List <object> listOfValues)
 {
     if (!(this.Value is BinFileValueList))
     {
         listOfValues.Add(this);
     }
     else
     {
         BinFileValueList binFileValueList = (BinFileValueList)this.Value;
         listOfValues.Add(binFileValueList);
         try
         {
             List <BinFileValue> .Enumerator enumerator = binFileValueList.Entries.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 BinFileValue current = enumerator.Current;
                 current.GetValues(ref listOfValues);
             }
         }
         finally
         {
         }
         listOfValues.Add(binFileValueList);
     }
 }
コード例 #2
0
ファイル: BinFile.cs プロジェクト: FateNineMeow/LuMei
        public List <object> EnumerateValues()
        {
            List <object> list = new List <object>();

            try
            {
                List <BinFileEntry> .Enumerator enumerator = this.Entries.GetEnumerator();
                while (enumerator.MoveNext())
                {
                    BinFileEntry current = enumerator.Current;
                    list.Add(current);
                    try
                    {
                        List <BinFileValue> .Enumerator enumerator2 = current.Values.GetEnumerator();
                        while (enumerator2.MoveNext())
                        {
                            BinFileValue current2 = enumerator2.Current;
                            current2.GetValues(ref list);
                        }
                    }
                    finally
                    {
                        ((IDisposable)enumerator).Dispose();
                    }
                    list.Add(current);
                }
            }
            finally
            {
                ((IDisposable)list).Dispose();
            }
            return(list);
        }