Fixes body expression style.
This commit is contained in:
parent
3f0a72a62f
commit
33f5e77a24
957 changed files with 7424 additions and 15973 deletions
|
|
@ -47,35 +47,15 @@ namespace Server.Diagnostics {
|
|||
|
||||
private Stopwatch _stopwatch;
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
return _name;
|
||||
}
|
||||
}
|
||||
public string Name => _name;
|
||||
|
||||
public long Count {
|
||||
get {
|
||||
return _count;
|
||||
}
|
||||
}
|
||||
public long Count => _count;
|
||||
|
||||
public TimeSpan AverageTime {
|
||||
get {
|
||||
return TimeSpan.FromTicks( _totalTime.Ticks / Math.Max( 1, _count ) );
|
||||
}
|
||||
}
|
||||
public TimeSpan AverageTime => TimeSpan.FromTicks( _totalTime.Ticks / Math.Max( 1, _count ) );
|
||||
|
||||
public TimeSpan PeakTime {
|
||||
get {
|
||||
return _peakTime;
|
||||
}
|
||||
}
|
||||
public TimeSpan PeakTime => _peakTime;
|
||||
|
||||
public TimeSpan TotalTime {
|
||||
get {
|
||||
return _totalTime;
|
||||
}
|
||||
}
|
||||
public TimeSpan TotalTime => _totalTime;
|
||||
|
||||
protected BaseProfile( string name ) {
|
||||
_name = name;
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ namespace Server.Diagnostics {
|
|||
public class GumpProfile : BaseProfile {
|
||||
private static Dictionary<Type, GumpProfile> _profiles = new Dictionary<Type, GumpProfile>();
|
||||
|
||||
public static IEnumerable<GumpProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<GumpProfile> Profiles => _profiles.Values;
|
||||
|
||||
public static GumpProfile Acquire( Type type ) {
|
||||
if ( !Core.Profiling ) {
|
||||
|
|
|
|||
|
|
@ -28,17 +28,9 @@ namespace Server.Diagnostics {
|
|||
public abstract class BasePacketProfile : BaseProfile {
|
||||
private long _totalLength;
|
||||
|
||||
public long TotalLength {
|
||||
get {
|
||||
return _totalLength;
|
||||
}
|
||||
}
|
||||
public long TotalLength => _totalLength;
|
||||
|
||||
public double AverageLength {
|
||||
get {
|
||||
return ( double ) _totalLength / Math.Max( 1, this.Count );
|
||||
}
|
||||
}
|
||||
public double AverageLength => ( double ) _totalLength / Math.Max( 1, this.Count );
|
||||
|
||||
protected BasePacketProfile(string name)
|
||||
: base( name ) {
|
||||
|
|
@ -60,11 +52,7 @@ namespace Server.Diagnostics {
|
|||
public class PacketSendProfile : BasePacketProfile {
|
||||
private static Dictionary<Type, PacketSendProfile> _profiles = new Dictionary<Type, PacketSendProfile>();
|
||||
|
||||
public static IEnumerable<PacketSendProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<PacketSendProfile> Profiles => _profiles.Values;
|
||||
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
public static PacketSendProfile Acquire( Type type ) {
|
||||
|
|
@ -97,11 +85,7 @@ namespace Server.Diagnostics {
|
|||
public class PacketReceiveProfile : BasePacketProfile {
|
||||
private static Dictionary<int, PacketReceiveProfile> _profiles = new Dictionary<int, PacketReceiveProfile>();
|
||||
|
||||
public static IEnumerable<PacketReceiveProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<PacketReceiveProfile> Profiles => _profiles.Values;
|
||||
|
||||
[MethodImpl(MethodImplOptions.Synchronized)]
|
||||
public static PacketReceiveProfile Acquire( int packetId ) {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ namespace Server.Diagnostics {
|
|||
public class TargetProfile : BaseProfile {
|
||||
private static Dictionary<Type, TargetProfile> _profiles = new Dictionary<Type, TargetProfile>();
|
||||
|
||||
public static IEnumerable<TargetProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<TargetProfile> Profiles => _profiles.Values;
|
||||
|
||||
public static TargetProfile Acquire( Type type ) {
|
||||
if ( !Core.Profiling ) {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,7 @@ namespace Server.Diagnostics {
|
|||
public class TimerProfile : BaseProfile {
|
||||
private static Dictionary<string, TimerProfile> _profiles = new Dictionary<string, TimerProfile>();
|
||||
|
||||
public static IEnumerable<TimerProfile> Profiles {
|
||||
get {
|
||||
return _profiles.Values;
|
||||
}
|
||||
}
|
||||
public static IEnumerable<TimerProfile> Profiles => _profiles.Values;
|
||||
|
||||
public static TimerProfile Acquire( string name ) {
|
||||
if ( !Core.Profiling ) {
|
||||
|
|
@ -48,30 +44,18 @@ namespace Server.Diagnostics {
|
|||
private long _created, _started, _stopped;
|
||||
|
||||
public long Created {
|
||||
get {
|
||||
return _created;
|
||||
}
|
||||
set {
|
||||
_created = value;
|
||||
}
|
||||
get => _created;
|
||||
set => _created = value;
|
||||
}
|
||||
|
||||
public long Started {
|
||||
get {
|
||||
return _started;
|
||||
}
|
||||
set {
|
||||
_started = value;
|
||||
}
|
||||
get => _started;
|
||||
set => _started = value;
|
||||
}
|
||||
|
||||
public long Stopped {
|
||||
get {
|
||||
return _stopped;
|
||||
}
|
||||
set {
|
||||
_stopped = value;
|
||||
}
|
||||
get => _stopped;
|
||||
set => _stopped = value;
|
||||
}
|
||||
|
||||
public TimerProfile( string name )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue