Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -14,9 +14,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
public override ExtensionInfo Info => ExtInfo;
|
||||
|
||||
private int m_Limit;
|
||||
|
||||
public int Limit => m_Limit;
|
||||
public int Limit { get; private set; }
|
||||
|
||||
public LimitExtension()
|
||||
{
|
||||
|
|
@ -24,16 +22,16 @@ namespace Server.Commands.Generic
|
|||
|
||||
public override void Parse( Mobile from, string[] arguments, int offset, int size )
|
||||
{
|
||||
m_Limit = Utility.ToInt32( arguments[offset] );
|
||||
Limit = Utility.ToInt32( arguments[offset] );
|
||||
|
||||
if ( m_Limit < 0 )
|
||||
if ( Limit < 0 )
|
||||
throw new Exception( "Limit cannot be less than zero." );
|
||||
}
|
||||
|
||||
public override void Filter( ArrayList list )
|
||||
{
|
||||
if ( list.Count > m_Limit )
|
||||
list.RemoveRange( m_Limit, list.Count - m_Limit );
|
||||
if ( list.Count > Limit )
|
||||
list.RemoveRange( Limit, list.Count - Limit );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue