Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

View file

@ -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 ) {