##// END OF EJS Templates
Reworked cancelation handling, if the cancel handler isn't specified the OperationCanceledException will be handled by the error handler...
Reworked cancelation handling, if the cancel handler isn't specified the OperationCanceledException will be handled by the error handler Any unhandled OperationCanceledException will cause the promise cancelation

File last commit:

r166:b84cdbe82e7f ref20160224
r187:dd4a3590f9c6 ref20160224
Show More
AutomatonTransition.cs
33 lines | 878 B | text/x-csharp | CSharpLexer
using System;
namespace Implab.Automaton {
public struct AutomatonTransition : IEquatable<AutomatonTransition> {
public readonly int s1;
public readonly int s2;
public readonly int edge;
public AutomatonTransition(int s1, int s2, int edge) {
this.s1 = s1;
this.s2 = s2;
this.edge = edge;
}
#region IEquatable implementation
public bool Equals(AutomatonTransition other) {
return other.s1 == s1 && other.s2 == s2 && other.edge == edge ;
}
#endregion
public override bool Equals(object obj) {
if (obj is AutomatonTransition)
return Equals((AutomatonTransition)obj);
return base.Equals(obj);
}
public override int GetHashCode() {
return s1 + s2 + edge;
}
}
}