Mercurial > hg > Database > jungle-sharp
comparison src/main/csharp/jp.ac.u-ryukyu.ie.cr/jungle/store/impl/logger/DefaultTreeOperationLog.cs @ 7:02b2ab7bffe6
fix
author | Kazuma |
---|---|
date | Tue, 27 Sep 2016 18:36:05 +0900 |
parents | dec15de2c6ff |
children |
comparison
equal
deleted
inserted
replaced
5:0428c8888abf | 7:02b2ab7bffe6 |
---|---|
7 | 7 |
8 public class DefaultTreeOperationLog : TreeOperationLog { | 8 public class DefaultTreeOperationLog : TreeOperationLog { |
9 private IEnumerable<TreeOperation> list; | 9 private IEnumerable<TreeOperation> list; |
10 private int size; | 10 private int size; |
11 | 11 |
12 TreeOperation[] _array; | |
13 TreeOperation Count; | |
14 | |
15 IEnumerator IEnumerable.GetEnumerator() | 12 IEnumerator IEnumerable.GetEnumerator() |
16 { | 13 { |
17 // call the generic version of the method | 14 // call the generic version of the method |
18 return this.GetEnumerator(); | 15 return this.GetEnumerator(); |
19 } | 16 } |
20 | 17 |
21 public IEnumerator<TreeOperation> GetEnumerator() | 18 public IEnumerator<TreeOperation> GetEnumerator() |
22 { | 19 { |
23 for (int i = 0; i < Convert.ToInt32(Count); i++) | 20 foreach (var i in list) { |
24 yield return _array[i]; | 21 yield return i; |
22 } | |
25 } | 23 } |
26 | 24 |
27 | 25 |
28 public DefaultTreeOperationLog() | 26 public DefaultTreeOperationLog() |
29 { | 27 { |