public static bool IsOfKind(this Region subject, RegionKind mask) { if (subject == null) return false; else return subject.Kind.IsIn(mask); }
public static bool IsIn(this RegionKind subject, RegionKind mask) { return (subject & mask) == subject; }
public ProtectedRegionSpan(int from, int to, RegionKind type) { From = from; To = to; Type = type; }