File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 55
66namespace Luaon . Linq
77{
8+ [ DebuggerDisplay ( "{Name}={Value}" ) ]
89 public class LField : LToken
910 {
1011
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ namespace Luaon.Linq
1111 /// Represents a table in Lua.
1212 /// </summary>
1313 /// <remarks>See <a herf="http://www.lua.org/manual/5.3/manual.html#2.1">2.1 Values and Types</a> for the basic concepts on Lua tables.</remarks>
14+ [ DebuggerDisplay ( "Count = {Count}" ) ]
15+ [ DebuggerTypeProxy ( typeof ( DebuggerView ) ) ]
1416 public class LTable : LToken , ICollection < LField >
1517 {
1618
@@ -293,7 +295,7 @@ internal override bool DeepEquals(LToken other)
293295 {
294296 var y = other as LTable ;
295297 if ( y == null ) return false ;
296- if ( ReferenceEquals ( this , y ) ) return true ;
298+ if ( ReferenceEquals ( this , y ) ) return true ;
297299 if ( store . Count != y . store . Count ) return false ;
298300 var count = store . Count ;
299301 for ( int i = 0 ; i < count ; i ++ )
@@ -322,5 +324,24 @@ IEnumerator IEnumerable.GetEnumerator()
322324 {
323325 return GetEnumerator ( ) ;
324326 }
327+
328+ internal sealed class DebuggerView
329+ {
330+
331+ private LTable myTable ;
332+
333+ public DebuggerView ( LTable table )
334+ {
335+ Debug . Assert ( table != null ) ;
336+ myTable = table ;
337+ }
338+
339+ public LField [ ] Items
340+ {
341+ get { return myTable . store . ToArray ( ) ; }
342+ }
343+
344+ }
345+
325346 }
326347}
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics ;
34using System . Text ;
45
56namespace Luaon . Linq
67{
78 /// <summary>
89 /// Represents a read-only Lua value node.
910 /// </summary>
11+ [ DebuggerDisplay ( "{Value}" ) ]
1012 public class LValue : LToken , IEquatable < LValue >
1113 {
1214
You can’t perform that action at this time.
0 commit comments