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
|
|
@ -26,11 +26,9 @@ using System.IO;
|
|||
|
||||
namespace Server.Diagnostics {
|
||||
public abstract class BasePacketProfile : BaseProfile {
|
||||
private long _totalLength;
|
||||
public long TotalLength { get; private set; }
|
||||
|
||||
public long TotalLength => _totalLength;
|
||||
|
||||
public double AverageLength => ( double ) _totalLength / Math.Max( 1, Count );
|
||||
public double AverageLength => ( double ) TotalLength / Math.Max( 1, Count );
|
||||
|
||||
protected BasePacketProfile(string name)
|
||||
: base( name ) {
|
||||
|
|
@ -39,7 +37,7 @@ namespace Server.Diagnostics {
|
|||
public void Finish( int length ) {
|
||||
Finish();
|
||||
|
||||
_totalLength += length;
|
||||
TotalLength += length;
|
||||
}
|
||||
|
||||
public override void WriteTo( TextWriter op ) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue