[Mono-dev] [PATCH] System.Transactions.Transaction
Raja R Harinath
rharinath at novell.com
Wed Nov 15 02:38:12 EST 2006
Hi,
"Matthijs ter Woord" <matthijsterwoord at gmail.com> writes:
> In the attached diff file, is a change for implementing the == and !=
> operators of System.Transactions.Transaction.
>
> Please review and commit...
>
> Index: Transaction.cs
> ===================================================================
> --- Transaction.cs (revision 67816)
> +++ Transaction.cs (working copy)
> @@ -57,6 +57,7 @@
> internal Transaction (Transaction other)
> {
> level = other.level;
> +
> info = other.info;
> dependents = other.dependents;
> }
> @@ -198,15 +199,20 @@
> }
>
> [MonoTODO]
> - public static bool op_Inequality (Transaction x, Transaction y)
> + public static bool operator != (Transaction x, Transaction y)
> {
> - if (x == null && y == null)
> - return false;
> - if (x == null || y == null)
> + if ((x as object) == null && (y as object) == null)
> + return false;
I'd prefer
ReferenceEquals (x, null)
instead. Also, please use the proper indentation.
- Hari
More information about the Mono-devel-list
mailing list