Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -28,24 +28,20 @@ namespace Server.ContextMenus
|
|||
/// </summary>
|
||||
public class ContextMenu
|
||||
{
|
||||
private Mobile m_From;
|
||||
private object m_Target;
|
||||
private ContextMenuEntry[] m_Entries;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Mobile" /> who opened this ContextMenu.
|
||||
/// </summary>
|
||||
public Mobile From => m_From;
|
||||
public Mobile From { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an object of the <see cref="Mobile" /> or <see cref="Item" /> for which this ContextMenu is on.
|
||||
/// </summary>
|
||||
public object Target => m_Target;
|
||||
public object Target { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of <see cref="ContextMenuEntry">entries</see> contained in this ContextMenu.
|
||||
/// </summary>
|
||||
public ContextMenuEntry[] Entries => m_Entries;
|
||||
public ContextMenuEntry[] Entries { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Instantiates a new ContextMenu instance.
|
||||
|
|
@ -60,8 +56,8 @@ namespace Server.ContextMenus
|
|||
/// </param>
|
||||
public ContextMenu( Mobile from, object target )
|
||||
{
|
||||
m_From = from;
|
||||
m_Target = target;
|
||||
From = from;
|
||||
Target = target;
|
||||
|
||||
List<ContextMenuEntry> list = new List<ContextMenuEntry>();
|
||||
|
||||
|
|
@ -76,11 +72,11 @@ namespace Server.ContextMenus
|
|||
|
||||
//m_Entries = (ContextMenuEntry[])list.ToArray( typeof( ContextMenuEntry ) );
|
||||
|
||||
m_Entries = list.ToArray();
|
||||
Entries = list.ToArray();
|
||||
|
||||
for ( int i = 0; i < m_Entries.Length; ++i )
|
||||
for ( int i = 0; i < Entries.Length; ++i )
|
||||
{
|
||||
m_Entries[i].Owner = this;
|
||||
Entries[i].Owner = this;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -91,9 +87,9 @@ namespace Server.ContextMenus
|
|||
{
|
||||
get
|
||||
{
|
||||
for ( int i = 0; i < m_Entries.Length; ++i )
|
||||
for ( int i = 0; i < Entries.Length; ++i )
|
||||
{
|
||||
if ( m_Entries[i].Number < 3000000 || m_Entries[i].Number > 3032767 )
|
||||
if ( Entries[i].Number < 3000000 || Entries[i].Number > 3032767 )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue