Imported Upstream version 3.8.0

Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
This commit is contained in:
Jo Shields
2014-09-04 09:07:35 +01:00
parent a575963da9
commit fe777c5c82
1062 changed files with 12460 additions and 5983 deletions

View File

@ -26,14 +26,13 @@
#if NET_4_0
using System;
using System.Threading;
namespace System.Threading
{
public struct CancellationTokenRegistration: IDisposable, IEquatable<CancellationTokenRegistration>
{
int id;
CancellationTokenSource source;
readonly int id;
readonly CancellationTokenSource source;
internal CancellationTokenRegistration (int id, CancellationTokenSource source)
{
@ -52,7 +51,7 @@ namespace System.Threading
#region IEquatable<CancellationTokenRegistration> implementation
public bool Equals (CancellationTokenRegistration other)
{
return this.id == other.id && this.source == other.source;
return id == other.id && source == other.source;
}
public static bool operator== (CancellationTokenRegistration left, CancellationTokenRegistration right)
@ -73,7 +72,7 @@ namespace System.Threading
public override bool Equals (object obj)
{
return (obj is CancellationTokenRegistration) ? Equals ((CancellationTokenRegistration)obj) : false;
return (obj is CancellationTokenRegistration) && Equals ((CancellationTokenRegistration)obj);
}
}
}