Fixes body expression style.

This commit is contained in:
Kamron Batman 2018-09-14 08:46:14 -07:00
parent 3f0a72a62f
commit 33f5e77a24
957 changed files with 7424 additions and 15973 deletions

View file

@ -6,7 +6,7 @@ namespace Server
{
private string m_Usage;
public string Usage{ get{ return m_Usage; } }
public string Usage => m_Usage;
public UsageAttribute( string usage )
{
@ -18,7 +18,7 @@ namespace Server
{
private string m_Description;
public string Description{ get{ return m_Description; } }
public string Description => m_Description;
public DescriptionAttribute( string description )
{
@ -30,7 +30,7 @@ namespace Server
{
private string[] m_Aliases;
public string[] Aliases{ get{ return m_Aliases; } }
public string[] Aliases => m_Aliases;
public AliasesAttribute( params string[] aliases )
{

View file

@ -15,20 +15,17 @@ namespace Server.Commands
public BaseCommandImplementor Scope
{
get{ return m_Scope; }
set{ m_Scope = value; }
get => m_Scope;
set => m_Scope = value;
}
public string Condition
{
get{ return m_Condition; }
set{ m_Condition = value; }
get => m_Condition;
set => m_Condition = value;
}
public ArrayList BatchCommands
{
get{ return m_BatchCommands; }
}
public ArrayList BatchCommands => m_BatchCommands;
public Batch()
{
@ -200,14 +197,14 @@ namespace Server.Commands
public string Command
{
get{ return m_Command; }
set{ m_Command = value; }
get => m_Command;
set => m_Command = value;
}
public string Object
{
get{ return m_Object; }
set{ m_Object = value; }
get => m_Object;
set => m_Object = value;
}
public void GetDetails( out string command, out string argString, out string[] args )

View file

@ -1109,8 +1109,8 @@ namespace Server.Commands
private Point3D m_Location;
private string m_Extra;
public Point3D Location{ get{ return m_Location; } }
public string Extra{ get{ return m_Extra; } }
public Point3D Location => m_Location;
public string Extra => m_Extra;
public DecorationEntry( string line )
{

View file

@ -1106,8 +1106,8 @@ namespace Server.Commands
private Point3D m_Location;
private string m_Extra;
public Point3D Location{ get{ return m_Location; } }
public string Extra{ get{ return m_Extra; } }
public Point3D Location => m_Location;
public string Extra => m_Extra;
public DecorationEntryMag( string line )
{

View file

@ -272,8 +272,8 @@ namespace Server.Commands
private Type m_Type;
private object m_Object;
public Type Type{ get{ return m_Type; } }
public object Object{ get{ return m_Object; } }
public Type Type => m_Type;
public object Object => m_Object;
public CategoryTypeEntry( Type type )
{
@ -290,11 +290,11 @@ namespace Server.Commands
private CategoryEntry m_Parent;
private ArrayList m_Matched;
public string Title{ get{ return m_Title; } }
public Type[] Matches{ get{ return m_Matches; } }
public CategoryEntry Parent{ get{ return m_Parent; } }
public CategoryEntry[] SubCategories{ get{ return m_SubCategories; } }
public ArrayList Matched{ get{ return m_Matched; } }
public string Title => m_Title;
public Type[] Matches => m_Matches;
public CategoryEntry Parent => m_Parent;
public CategoryEntry[] SubCategories => m_SubCategories;
public ArrayList Matched => m_Matched;
public CategoryEntry()
{
@ -378,8 +378,8 @@ namespace Server.Commands
private int m_Indentation;
private string m_Text;
public int Indentation{ get{ return m_Indentation; } }
public string Text{ get{ return m_Text; } }
public int Indentation => m_Indentation;
public string Text => m_Text;
public CategoryLine( string input )
{

View file

@ -24,44 +24,44 @@ namespace Server.Commands.Generic
public bool ListOptimized
{
get{ return m_ListOptimized; }
set{ m_ListOptimized = value; }
get => m_ListOptimized;
set => m_ListOptimized = value;
}
public string[] Commands
{
get{ return m_Commands; }
set{ m_Commands = value; }
get => m_Commands;
set => m_Commands = value;
}
public string Usage
{
get{ return m_Usage; }
set{ m_Usage = value; }
get => m_Usage;
set => m_Usage = value;
}
public string Description
{
get{ return m_Description; }
set{ m_Description = value; }
get => m_Description;
set => m_Description = value;
}
public AccessLevel AccessLevel
{
get{ return m_AccessLevel; }
set{ m_AccessLevel = value; }
get => m_AccessLevel;
set => m_AccessLevel = value;
}
public ObjectTypes ObjectTypes
{
get{ return m_ObjectTypes; }
set{ m_ObjectTypes = value; }
get => m_ObjectTypes;
set => m_ObjectTypes = value;
}
public CommandSupport Supports
{
get{ return m_Implementors; }
set{ m_Implementors = value; }
get => m_Implementors;
set => m_Implementors = value;
}
public BaseCommand()

View file

@ -60,7 +60,7 @@ namespace Server.Commands.Generic
private static List<BaseCommand> m_AllCommands = new List<BaseCommand>();
public static List<BaseCommand> AllCommands{ get{ return m_AllCommands; } }
public static List<BaseCommand> AllCommands => m_AllCommands;
public static void Register( BaseCommand command )
{

View file

@ -10,10 +10,7 @@ namespace Server.Commands.Generic
{
private static Dictionary<string, ExtensionInfo> m_Table = new Dictionary<string, ExtensionInfo>( StringComparer.InvariantCultureIgnoreCase );
public static Dictionary<string, ExtensionInfo> Table
{
get { return m_Table; }
}
public static Dictionary<string, ExtensionInfo> Table => m_Table;
public static void Register( ExtensionInfo ext )
{
@ -27,30 +24,15 @@ namespace Server.Commands.Generic
private ExtensionConstructor m_Constructor;
public int Order
{
get { return m_Order; }
}
public int Order => m_Order;
public string Name
{
get { return m_Name; }
}
public string Name => m_Name;
public int Size
{
get { return m_Size; }
}
public int Size => m_Size;
public bool IsFixedSize
{
get { return ( m_Size >= 0 ); }
}
public bool IsFixedSize => ( m_Size >= 0 );
public ExtensionConstructor Constructor
{
get { return m_Constructor; }
}
public ExtensionConstructor Constructor => m_Constructor;
public ExtensionInfo( int order, string name, int size, ExtensionConstructor constructor )
{
@ -141,25 +123,13 @@ namespace Server.Commands.Generic
{
public abstract ExtensionInfo Info { get; }
public string Name
{
get { return Info.Name; }
}
public string Name => Info.Name;
public int Size
{
get { return Info.Size; }
}
public int Size => Info.Size;
public bool IsFixedSize
{
get { return Info.IsFixedSize; }
}
public bool IsFixedSize => Info.IsFixedSize;
public int Order
{
get { return Info.Order; }
}
public int Order => Info.Order;
public virtual void Optimize( Mobile from, Type baseType, ref AssemblyEmitter assembly )
{

View file

@ -44,25 +44,13 @@ namespace Server.Commands.Generic
private object m_Value;
private FieldInfo m_Field;
public Type Type
{
get { return m_Type; }
}
public Type Type => m_Type;
public object Value
{
get { return m_Value; }
}
public object Value => m_Value;
public FieldInfo Field
{
get { return m_Field; }
}
public FieldInfo Field => m_Field;
public bool HasField
{
get { return ( m_Field != null ); }
}
public bool HasField => ( m_Field != null );
public PropertyValue( Type type, object value )
{

View file

@ -12,25 +12,25 @@ namespace Server.Commands.Generic
public Property Property
{
get { return m_Property; }
set { m_Property = value; }
get => m_Property;
set => m_Property = value;
}
public bool IsAscending
{
get { return ( m_Order > 0 ); }
set { m_Order = ( value ? +1 : -1 ); }
get => ( m_Order > 0 );
set => m_Order = ( value ? +1 : -1 );
}
public bool IsDescending
{
get { return ( m_Order < 0 ); }
set { m_Order = ( value ? -1 : +1 ); }
get => ( m_Order < 0 );
set => m_Order = ( value ? -1 : +1 );
}
public int Sign
{
get { return Math.Sign( m_Order ); }
get => Math.Sign( m_Order );
set
{
m_Order = Math.Sign( value );

View file

@ -13,10 +13,7 @@ namespace Server.Commands.Generic
ExtensionInfo.Register( ExtInfo );
}
public override ExtensionInfo Info
{
get { return ExtInfo; }
}
public override ExtensionInfo Info => ExtInfo;
private List<Property> m_Properties;

View file

@ -12,17 +12,11 @@ namespace Server.Commands.Generic
ExtensionInfo.Register( ExtInfo );
}
public override ExtensionInfo Info
{
get { return ExtInfo; }
}
public override ExtensionInfo Info => ExtInfo;
private int m_Limit;
public int Limit
{
get { return m_Limit; }
}
public int Limit => m_Limit;
public LimitExtension()
{

View file

@ -13,10 +13,7 @@ namespace Server.Commands.Generic
ExtensionInfo.Register( ExtInfo );
}
public override ExtensionInfo Info
{
get { return ExtInfo; }
}
public override ExtensionInfo Info => ExtInfo;
private List<OrderInfo> m_Orders;

View file

@ -11,17 +11,11 @@ namespace Server.Commands.Generic
ExtensionInfo.Register( ExtInfo );
}
public override ExtensionInfo Info
{
get { return ExtInfo; }
}
public override ExtensionInfo Info => ExtInfo;
private ObjectConditional m_Conditional;
public ObjectConditional Conditional
{
get { return m_Conditional; }
}
public ObjectConditional Conditional => m_Conditional;
public WhereExtension()
{

View file

@ -7,10 +7,7 @@ namespace Server.Commands.Generic
{
private static AreaCommandImplementor m_Instance;
public static AreaCommandImplementor Instance
{
get { return m_Instance; }
}
public static AreaCommandImplementor Instance => m_Instance;
public AreaCommandImplementor()
{

View file

@ -57,44 +57,41 @@ namespace Server.Commands.Generic
public bool SupportsConditionals
{
get{ return m_SupportsConditionals; }
set{ m_SupportsConditionals = value; }
get => m_SupportsConditionals;
set => m_SupportsConditionals = value;
}
public string[] Accessors
{
get{ return m_Accessors; }
set{ m_Accessors = value; }
get => m_Accessors;
set => m_Accessors = value;
}
public string Usage
{
get{ return m_Usage; }
set{ m_Usage = value; }
get => m_Usage;
set => m_Usage = value;
}
public string Description
{
get{ return m_Description; }
set{ m_Description = value; }
get => m_Description;
set => m_Description = value;
}
public AccessLevel AccessLevel
{
get{ return m_AccessLevel; }
set{ m_AccessLevel = value; }
get => m_AccessLevel;
set => m_AccessLevel = value;
}
public CommandSupport SupportRequirement
{
get{ return m_SupportRequirement; }
set{ m_SupportRequirement = value; }
get => m_SupportRequirement;
set => m_SupportRequirement = value;
}
public Dictionary<string, BaseCommand> Commands
{
get{ return m_Commands; }
}
public Dictionary<string, BaseCommand> Commands => m_Commands;
public BaseCommandImplementor()
{

View file

@ -15,27 +15,15 @@ namespace Server.Commands.Generic
private IConditional[] m_Conditionals;
public Type Type
{
get { return m_ObjectType; }
}
public Type Type => m_ObjectType;
public bool IsItem
{
get { return ( m_ObjectType == null || m_ObjectType == typeofItem || m_ObjectType.IsSubclassOf( typeofItem ) ); }
}
public bool IsItem => ( m_ObjectType == null || m_ObjectType == typeofItem || m_ObjectType.IsSubclassOf( typeofItem ) );
public bool IsMobile
{
get { return ( m_ObjectType == null || m_ObjectType == typeofMobile || m_ObjectType.IsSubclassOf( typeofMobile ) ); }
}
public bool IsMobile => ( m_ObjectType == null || m_ObjectType == typeofMobile || m_ObjectType.IsSubclassOf( typeofMobile ) );
public static readonly ObjectConditional Empty = new ObjectConditional( null, null );
public bool HasCompiled
{
get { return ( m_Conditionals != null ); }
}
public bool HasCompiled => ( m_Conditionals != null );
public void Compile( ref AssemblyEmitter emitter )
{

View file

@ -4,10 +4,7 @@ namespace Server.Commands.Generic
{
private static RangeCommandImplementor m_Instance;
public static RangeCommandImplementor Instance
{
get { return m_Instance; }
}
public static RangeCommandImplementor Instance => m_Instance;
public RangeCommandImplementor()
{

View file

@ -9,9 +9,11 @@ namespace Server.Commands
private static StreamWriter m_Output;
private static bool m_Enabled = true;
public static bool Enabled{ get{ return m_Enabled; } set{ m_Enabled = value; } }
public static bool Enabled{ get => m_Enabled;
set => m_Enabled = value;
}
public static StreamWriter Output{ get{ return m_Output; } }
public static StreamWriter Output => m_Output;
public static void Initialize()
{

View file

@ -579,10 +579,7 @@ namespace Server
{
protected Property m_Property;
public Property Property
{
get { return m_Property; }
}
public Property Property => m_Property;
public PropertyException( Property property, string message )
: base( message )
@ -660,15 +657,9 @@ namespace Server
protected AccessLevel m_PlayerAccess;
protected AccessLevel m_NeededAccess;
public AccessLevel PlayerAccess
{
get { return m_PlayerAccess; }
}
public AccessLevel PlayerAccess => m_PlayerAccess;
public AccessLevel NeededAccess
{
get { return m_NeededAccess; }
}
public AccessLevel NeededAccess => m_NeededAccess;
public ClearanceException( Property property, AccessLevel playerAccess, AccessLevel neededAccess, string accessType )
: base( property, string.Format(
@ -703,20 +694,11 @@ namespace Server
private PropertyInfo[] m_Chain;
private PropertyAccess m_Access;
public string Binding
{
get { return m_Binding; }
}
public string Binding => m_Binding;
public bool IsBound
{
get { return ( m_Chain != null ); }
}
public bool IsBound => ( m_Chain != null );
public PropertyAccess Access
{
get { return m_Access; }
}
public PropertyAccess Access => m_Access;
public PropertyInfo[] Chain
{