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

@ -8,11 +8,9 @@ namespace Server.Guilds
{
public abstract class BaseGuildGump : Gump
{
private Guild m_Guild;
private PlayerMobile m_Player;
protected Guild guild { get; }
protected Guild guild => m_Guild;
protected PlayerMobile player => m_Player;
protected PlayerMobile player { get; }
public BaseGuildGump( PlayerMobile pm, Guild g ) : this( pm, g, 10, 10 )
{
@ -20,8 +18,8 @@ namespace Server.Guilds
public BaseGuildGump( PlayerMobile pm, Guild g, int x, int y ) : base( x, y )
{
m_Guild = g;
m_Player = pm;
guild = g;
player = pm;
pm.CloseGump( typeof( BaseGuildGump ) );
}

View file

@ -188,18 +188,17 @@ namespace Server.Guilds
}
public struct InfoField<T>
{
private TextDefinition m_Name;
private int m_Width;
private IComparer<T> m_Comparer;
public TextDefinition Name { get; }
public int Width { get; }
public IComparer<T> Comparer { get; }
public TextDefinition Name => m_Name;
public int Width => m_Width;
public IComparer<T> Comparer => m_Comparer;
public InfoField( TextDefinition name, int width, IComparer<T> comparer )
{
m_Name = name;
m_Width = width;
m_Comparer = comparer;
Name = name;
Width = width;
Comparer = comparer;
}
}
}