# HG changeset patch # User IBBoard # Date 1282385092 0 # Node ID 90b9a3fe3c18e75efe3f7f4d2e162a5535488b9f # Parent 0744a1cc03ccf18a3391ff37eda8b4b7be9bbb15 * Correct licensing comments at top of files * Add an EqualityChecker class to handle null-safe equality checks no-open-ticket diff -r 0744a1cc03cc -r 90b9a3fe3c18 EqualityChecker.cs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EqualityChecker.cs Sat Aug 21 10:04:52 2010 +0000 @@ -0,0 +1,25 @@ +// This file (EqualityChecker.cs) is a part of the IBBoard project and is copyright 2010 IBBoard +// +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. +using System; +namespace IBBoard +{ + /// + /// Null-safe equality checker + /// + public class EqualityChecker + { + public static bool AreEqual(object obj1, object obj2) + { + bool areEqual = false; + + if ((obj1 == null && obj2 == null) || (obj1 != null && obj1.Equals(obj2))) + { + areEqual = true; + } + + return areEqual; + } + } +} + diff -r 0744a1cc03cc -r 90b9a3fe3c18 IBBoard.csproj --- a/IBBoard.csproj Tue Jul 20 19:26:06 2010 +0000 +++ b/IBBoard.csproj Sat Aug 21 10:04:52 2010 +0000 @@ -140,6 +140,7 @@ + diff -r 0744a1cc03cc -r 90b9a3fe3c18 Lang/ModifiableTranslationSet.cs --- a/Lang/ModifiableTranslationSet.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Lang/ModifiableTranslationSet.cs Sat Aug 21 10:04:52 2010 +0000 @@ -1,6 +1,6 @@ // This file (TranslationSet.cs) is a part of the IBBoard project and is copyright 2010 IBBoard // -// 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. +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; using System.Collections.Generic; diff -r 0744a1cc03cc -r 90b9a3fe3c18 Lang/TranslationLanguage.cs --- a/Lang/TranslationLanguage.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Lang/TranslationLanguage.cs Sat Aug 21 10:04:52 2010 +0000 @@ -1,6 +1,6 @@ // This file (TranslationLanguage.cs) is a part of the IBBoard project and is copyright 2010 IBBoard // -// 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. +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; using System.Globalization; diff -r 0744a1cc03cc -r 90b9a3fe3c18 Lang/TranslationXmlLoader.cs --- a/Lang/TranslationXmlLoader.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Lang/TranslationXmlLoader.cs Sat Aug 21 10:04:52 2010 +0000 @@ -1,6 +1,6 @@ // This file (TranslationXmlLoader.cs) is a part of the IBBoard project and is copyright 2010 IBBoard // -// 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. +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; using System.IO; diff -r 0744a1cc03cc -r 90b9a3fe3c18 Limits/ILimit.cs --- a/Limits/ILimit.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Limits/ILimit.cs Sat Aug 21 10:04:52 2010 +0000 @@ -1,6 +1,6 @@ // This file (ILimit.cs) is a part of the IBBoard project and is copyright 2009 IBBoard // -// 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. +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; diff -r 0744a1cc03cc -r 90b9a3fe3c18 Limits/INumericLimit.cs --- a/Limits/INumericLimit.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Limits/INumericLimit.cs Sat Aug 21 10:04:52 2010 +0000 @@ -1,6 +1,6 @@ // This file (INumericLimit.cs) is a part of the IBBoard project and is copyright 2009 IBBoard // -// 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. +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; diff -r 0744a1cc03cc -r 90b9a3fe3c18 Limits/IPercentageLimit.cs --- a/Limits/IPercentageLimit.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Limits/IPercentageLimit.cs Sat Aug 21 10:04:52 2010 +0000 @@ -1,6 +1,6 @@ // This file (IPercentageLimit.cs) is a part of the IBBoard project and is copyright 2009 IBBoard // -// 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. +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. using System; diff -r 0744a1cc03cc -r 90b9a3fe3c18 Logging/Logger.cs --- a/Logging/Logger.cs Tue Jul 20 19:26:06 2010 +0000 +++ b/Logging/Logger.cs Sat Aug 21 10:04:52 2010 +0000 @@ -86,7 +86,7 @@ public void ResetInternalLog() { - logMessages = new List(); + logMessages = new List(); LogMessageString("Log reset at " + String.Format("{0:yyyy-MM-dd-HHmmss}", DateTime.Now)); }