2 // TransactionOptions.cs
5 // Atsushi Enomoto <atsushi@ximian.com>
12 namespace System.Transactions
14 public struct TransactionOptions
20 internal TransactionOptions (IsolationLevel level, TimeSpan timeout)
23 this.timeout = timeout;
26 public IsolationLevel IsolationLevel {
28 set { level = value; }
31 public TimeSpan Timeout {
32 get { return timeout; }
33 set { timeout = value; }
36 public static bool operator == (TransactionOptions o1,
37 TransactionOptions o2)
39 return o1.level == o2.level &&
40 o1.timeout == o2.timeout;
43 public static bool operator != (TransactionOptions o1,
44 TransactionOptions o2)
46 return o1.level != o2.level ||
47 o1.timeout != o2.timeout;
50 public override bool Equals (object obj)
52 if (! (obj is TransactionOptions))
54 return this == (TransactionOptions) obj;
57 public override int GetHashCode ()
59 return (int) level ^ timeout.GetHashCode ();