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

@ -24,11 +24,7 @@ namespace Server.Network
{
public class BufferPool
{
private static List<BufferPool> m_Pools = new List<BufferPool>();
public static List<BufferPool> Pools{ get => m_Pools;
set => m_Pools = value;
}
public static List<BufferPool> Pools { get; set; } = new List<BufferPool>();
private string m_Name;
@ -64,8 +60,8 @@ namespace Server.Network
for ( int i = 0; i < initialCapacity; ++i )
m_FreeBuffers.Enqueue( new byte[bufferSize] );
lock ( m_Pools )
m_Pools.Add( this );
lock ( Pools )
Pools.Add( this );
}
public byte[] AcquireBuffer()
@ -95,8 +91,8 @@ namespace Server.Network
public void Free()
{
lock ( m_Pools )
m_Pools.Remove( this );
lock ( Pools )
Pools.Remove( this );
}
}
}