Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -86,10 +86,7 @@ namespace Server.Network
public class AsyncState
{
public bool Paused { get; set; }
public AsyncState(bool paused)
{
Paused = paused;
}
public AsyncState(bool paused) => Paused = paused;
}
public class NetState : IComparable<NetState>
@ -402,10 +399,7 @@ namespace Server.Network
public IAccount Account { get; set; }
public override string ToString()
{
return m_ToString;
}
public override string ToString() => m_ToString;
public static List<NetState> Instances { get; } = new List<NetState>();
@ -595,11 +589,9 @@ namespace Server.Network
pr.Complete();
}
public PacketHandler GetHandler(int packetID)
{
return ContainerGridLines ? PacketHandlers.Get6017Handler(packetID) :
public PacketHandler GetHandler(int packetID) =>
ContainerGridLines ? PacketHandlers.Get6017Handler(packetID) :
PacketHandlers.GetHandler(packetID);
}
private long m_NextCheckActivity;
@ -619,15 +611,13 @@ namespace Server.Network
try
{
using (StreamWriter op = new StreamWriter("network-errors.log", true))
{
op.WriteLine("# {0}", DateTime.UtcNow);
using StreamWriter op = new StreamWriter("network-errors.log", true);
op.WriteLine("# {0}", DateTime.UtcNow);
op.WriteLine(ex);
op.WriteLine(ex);
op.WriteLine();
op.WriteLine();
}
op.WriteLine();
op.WriteLine();
}
catch
{
@ -639,7 +629,9 @@ namespace Server.Network
private int m_Disposing;
public bool IsDisposing { get { return m_Disposing != 0; } private set { m_Disposing = value ? 1 : 0; } }
public bool IsDisposing { get => m_Disposing != 0;
private set => m_Disposing = value ? 1 : 0;
}
public virtual void Dispose()
{
@ -751,14 +743,8 @@ namespace Server.Network
return info.RequiredClient != null ? Version >= info.RequiredClient : (Flags & info.ClientFlags) != 0;
}
public bool SupportsExpansion(Expansion ex, bool checkCoreExpansion = true)
{
return SupportsExpansion(ExpansionInfo.GetInfo(ex), checkCoreExpansion);
}
public bool SupportsExpansion(Expansion ex, bool checkCoreExpansion = true) => SupportsExpansion(ExpansionInfo.GetInfo(ex), checkCoreExpansion);
public int CompareTo(NetState other)
{
return other == null ? 1 : m_ToString.CompareTo(other.m_ToString);
}
public int CompareTo(NetState other) => other == null ? 1 : m_ToString.CompareTo(other.m_ToString);
}
}