2 // TransactionOptions.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
11 namespace System.Transactions
13 public struct TransactionOptions
19 internal TransactionOptions (IsolationLevel level, TimeSpan timeout)
22 this.timeout = timeout;
25 public IsolationLevel IsolationLevel {
27 set { level = value; }
30 public TimeSpan Timeout {
31 get { return timeout; }
32 set { timeout = value; }
35 public static bool operator == (TransactionOptions o1,
36 TransactionOptions o2)
38 return o1.level == o2.level &&
39 o1.timeout == o2.timeout;
42 public static bool operator != (TransactionOptions o1,
43 TransactionOptions o2)
45 return o1.level != o2.level ||
46 o1.timeout != o2.timeout;
49 public override bool Equals (object obj)
51 if (! (obj is TransactionOptions))
53 return this == (TransactionOptions) obj;
56 public override int GetHashCode ()
58 return (int) level ^ timeout.GetHashCode ();