changeset 381:30db6669f5cd

* Update to VS.Net 2010 compatibility * Fix whitespace no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 07 Aug 2011 19:15:33 +0000
parents 7036bf04e955
children 6da9db4a9c23
files API/Objects/Requirement/AbstractRequirement.cs IBBoard.WarFoundry.API.csproj
diffstat 2 files changed, 64 insertions(+), 65 deletions(-) [+]
line diff
     1.1 --- a/API/Objects/Requirement/AbstractRequirement.cs	Sat Jul 23 20:01:26 2011 +0000
     1.2 +++ b/API/Objects/Requirement/AbstractRequirement.cs	Sun Aug 07 19:15:33 2011 +0000
     1.3 @@ -3,66 +3,67 @@
     1.4  // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
     1.5  using System;
     1.6  
     1.7 +
     1.8  namespace IBBoard.WarFoundry.API.Objects.Requirement
     1.9  {
    1.10  	public abstract class AbstractRequirement : IRequirement
    1.11 -	{
    1.12 -		public override bool Equals (object obj)
    1.13 -		{
    1.14 -			if (obj == null)
    1.15 -			{
    1.16 -				return false;
    1.17 -			}
    1.18 -			else if (obj.GetType().Equals(this.GetType()))
    1.19 -			{
    1.20 -				return TypeEquals(obj);
    1.21 -			}
    1.22 -			else
    1.23 -			{
    1.24 -				return false;
    1.25 -			}
    1.26 -		}
    1.27 -
    1.28 -		/// <summary>
    1.29 -		/// Type-specific equality checking - must be implemented by each class
    1.30 -		/// </summary>
    1.31 -		/// <returns>
    1.32 -		/// <code>true</code> if this object is equal to <code>obj</code>, else <code>false</code>
    1.33 -		/// </returns>
    1.34 -		/// <param name='obj'>
    1.35 -		/// The object to compare to
    1.36 -		/// </param>
    1.37 -		protected abstract bool TypeEquals(object obj);
    1.38 -
    1.39 -		protected virtual bool IsApplicable(WarFoundryObject toObjectAdded, Army toArmy)
    1.40 -		{
    1.41 -			return IsApplicable(toArmy) || IsApplicable(toObjectAdded);
    1.42 -		}
    1.43 -
    1.44 -		protected virtual bool IsApplicable(Army toArmy)
    1.45 -		{
    1.46 -			return true;
    1.47 -		}
    1.48 -
    1.49 -		protected virtual bool IsApplicable(WarFoundryObject toObject)
    1.50 -		{
    1.51 -			return true;
    1.52 -		}
    1.53 -
    1.54 -
    1.55 -		public string GetValidationMessage(Army army)
    1.56 -		{
    1.57 -			string message = "";
    1.58 -
    1.59 -			Validation result = ValidatesArmy(army);
    1.60 -			if (!Validates.AsOkay(result))
    1.61 -			{
    1.62 -				message = GetValidationFailedMessage(army);
    1.63 -			}
    1.64 -
    1.65 -			return message;
    1.66 +	{
    1.67 +		public override bool Equals (object obj)
    1.68 +		{
    1.69 +			if (obj == null)
    1.70 +			{
    1.71 +				return false;
    1.72 +			}
    1.73 +			else if (obj.GetType().Equals(this.GetType()))
    1.74 +			{
    1.75 +				return TypeEquals(obj);
    1.76 +			}
    1.77 +			else
    1.78 +			{
    1.79 +				return false;
    1.80 +			}
    1.81  		}
    1.82 -
    1.83 +
    1.84 +		/// <summary>
    1.85 +		/// Type-specific equality checking - must be implemented by each class
    1.86 +		/// </summary>
    1.87 +		/// <returns>
    1.88 +		/// <code>true</code> if this object is equal to <code>obj</code>, else <code>false</code>
    1.89 +		/// </returns>
    1.90 +		/// <param name='obj'>
    1.91 +		/// The object to compare to
    1.92 +		/// </param>
    1.93 +		protected abstract bool TypeEquals(object obj);
    1.94 +
    1.95 +		protected virtual bool IsApplicable(WarFoundryObject toObjectAdded, Army toArmy)
    1.96 +		{
    1.97 +			return IsApplicable(toArmy) || IsApplicable(toObjectAdded);
    1.98 +		}
    1.99 +
   1.100 +		protected virtual bool IsApplicable(Army toArmy)
   1.101 +		{
   1.102 +			return true;
   1.103 +		}
   1.104 +
   1.105 +		protected virtual bool IsApplicable(WarFoundryObject toObject)
   1.106 +		{
   1.107 +			return true;
   1.108 +		}
   1.109 +
   1.110 +
   1.111 +		public string GetValidationMessage(Army army)
   1.112 +		{
   1.113 +			string message = "";
   1.114 +
   1.115 +			Validation result = ValidatesArmy(army);
   1.116 +			if (!Validates.AsOkay(result))
   1.117 +			{
   1.118 +				message = GetValidationFailedMessage(army);
   1.119 +			}
   1.120 +
   1.121 +			return message;
   1.122 +		}
   1.123 +
   1.124  		protected abstract string GetValidationFailedMessage(Army army);
   1.125  
   1.126  		public string GetAllowsAddingMessage(UnitType toAdd, Army toArmy)
   1.127 @@ -78,11 +79,11 @@
   1.128  			return message;
   1.129  		}
   1.130  
   1.131 -		protected abstract string GetAllowsAddingFailedMessage(UnitType toAdd, Army toArmy);
   1.132 -
   1.133 -		public abstract  Validation AllowsAdding(WarFoundryObject wfObject, Army toArmy);
   1.134 -
   1.135 -		public abstract  Validation ValidatesArmy(Army army);
   1.136 +		protected abstract string GetAllowsAddingFailedMessage(UnitType toAdd, Army toArmy);
   1.137 +
   1.138 +		public abstract  Validation AllowsAdding(WarFoundryObject wfObject, Army toArmy);
   1.139 +
   1.140 +		public abstract  Validation ValidatesArmy(Army army);
   1.141  	}
   1.142  }
   1.143  
     2.1 --- a/IBBoard.WarFoundry.API.csproj	Sat Jul 23 20:01:26 2011 +0000
     2.2 +++ b/IBBoard.WarFoundry.API.csproj	Sun Aug 07 19:15:33 2011 +0000
     2.3 @@ -1,5 +1,5 @@
     2.4  <?xml version="1.0" encoding="utf-8"?>
     2.5 -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
     2.6 +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
     2.7    <PropertyGroup>
     2.8      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     2.9      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    2.10 @@ -12,12 +12,10 @@
    2.11      <AssemblyName>IBBoard.WarFoundry.API</AssemblyName>
    2.12      <FileUpgradeFlags>
    2.13      </FileUpgradeFlags>
    2.14 -    <OldToolsVersion>2.0</OldToolsVersion>
    2.15 +    <OldToolsVersion>3.5</OldToolsVersion>
    2.16      <UpgradeBackupLocation>
    2.17      </UpgradeBackupLocation>
    2.18      <IsWebBootstrapper>false</IsWebBootstrapper>
    2.19 -    <TargetFrameworkSubset>
    2.20 -    </TargetFrameworkSubset>
    2.21      <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    2.22      <PublishUrl>publish\</PublishUrl>
    2.23      <Install>true</Install>