@@ -7,7 +7,6 @@ This Source Code Form is subject to the terms of the
77
88using System ;
99using System . Collections . Generic ;
10- using System . Linq ;
1110using OneScript . Contexts ;
1211using OneScript . Exceptions ;
1312using OneScript . Execution ;
@@ -72,7 +71,7 @@ public ValueTree Owner()
7271 [ ContextMethod ( "Количество" , "Count" ) ]
7372 public override int Count ( )
7473 {
75- return _rows . Count ( ) ;
74+ return _rows . Count ;
7675 }
7776
7877 /// <summary>
@@ -323,12 +322,12 @@ public void Move(BslValue row, int offset)
323322 else
324323 throw RuntimeException . InvalidArgumentType ( ) ;
325324
326- if ( indexSource < 0 || indexSource >= _rows . Count ( ) )
325+ if ( indexSource < 0 || indexSource >= _rows . Count )
327326 throw RuntimeException . InvalidArgumentValue ( ) ;
328327
329- int indexDestination = ( indexSource + offset ) % _rows . Count ( ) ;
328+ int indexDestination = ( indexSource + offset ) % _rows . Count ;
330329 while ( indexDestination < 0 )
331- indexDestination += _rows . Count ( ) ;
330+ indexDestination += _rows . Count ;
332331
333332 ValueTreeRow tmp = _rows [ indexSource ] ;
334333
@@ -361,15 +360,15 @@ private List<ValueTreeSortRule> GetSortRules(string columns)
361360 foreach ( string column in aColumns )
362361 {
363362 string [ ] description = column . Trim ( ) . Split ( ' ' ) ;
364- if ( description . Count ( ) == 0 )
363+ if ( description . Length == 0 )
365364 throw WrongColumnNameException ( ) ;
366365
367366 ValueTreeSortRule desc = new ValueTreeSortRule ( ) ;
368367 desc . Column = this . Columns . FindColumnByName ( description [ 0 ] ) ;
369368 if ( desc . Column == null )
370369 throw WrongColumnNameException ( description [ 0 ] ) ;
371370
372- if ( description . Count ( ) > 1 )
371+ if ( description . Length > 1 )
373372 {
374373 if ( String . Compare ( description [ 1 ] , "DESC" , true ) == 0 || String . Compare ( description [ 1 ] , "УБЫВ" , true ) == 0 )
375374 desc . direction = - 1 ;
@@ -393,7 +392,7 @@ private class RowComparator : IComparer<ValueTreeRow>
393392
394393 public RowComparator ( IBslProcess process , List < ValueTreeSortRule > rules )
395394 {
396- if ( rules . Count ( ) == 0 )
395+ if ( rules . Count == 0 )
397396 throw RuntimeException . InvalidArgumentValue ( ) ;
398397
399398 this . _rules = rules ;
@@ -415,7 +414,7 @@ public int Compare(ValueTreeRow x, ValueTreeRow y)
415414 int i = 0 , r ;
416415 while ( ( r = OneCompare ( x , y , _rules [ i ] ) ) == 0 )
417416 {
418- if ( ++ i >= _rules . Count ( ) )
417+ if ( ++ i >= _rules . Count )
419418 return 0 ;
420419 }
421420
0 commit comments